@99xt/first-born
Advanced tools
Comparing version 1.1.3 to 1.1.4
{ | ||
"name": "@99xt/first-born", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"description": "React Native UI Framework", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -158,5 +158,6 @@ # first-born | ||
| Prop | Description | Default | | ||
|-------------|----------------------|-----------| | ||
| **`color`** | Color of the button. | _primary_ | | ||
| Prop | Description | Default | | ||
|---------------|-------------------------------------|-----------| | ||
| **`color`** | Color of the badge. | _primary_ | | ||
| **`outline`** | If the badge has the outline style. | _false_ | | ||
@@ -245,2 +246,3 @@ #### Thumbnail | ||
| **`errorStyle`** | Custom DatePicker error style. (Style object) | _None_ | | ||
| **`errorColor`** | Color of DatePicker when validation fails | _error_ | | ||
@@ -273,2 +275,5 @@ #### Input | ||
| **`errorStyle`** | Custom Input error style. (Style object) | _None_ | | ||
| **`errorColor`** | Color of Input when validation fails | _error_ | | ||
| **`iconLeft`** | Icon Atom to render on the left of the Input | _None_ | | ||
| **`iconRight`** | Icon Atom to render on the right of the Input | _None_ | | ||
@@ -311,2 +316,3 @@ #### Picker | ||
| **`errorStyle`** | Custom Picker error style. (Style object) | _None_ | | ||
| **`errorColor`** | Color of Picker when validation fails | _error_ | | ||
@@ -334,8 +340,9 @@ #### TextArea | ||
| **`errorMessage`** | Error message to display below input, if validation fails | _None_ | | ||
| **`underline`** | If DatePicker style is an underline. | _false_ | | ||
| **`defaultStyle`** | If DatePicker style is default as seen above. | _true_ | | ||
| **`noStyle`** | If DatePicker has no framework defined style. | _false_ | | ||
| **`style`** | Custom DatePicker inactive style. (Style object) | _None_ | | ||
| **`activeStyle`** | Custom DatePicker active style. (Style object) | _None_ | | ||
| **`errorStyle`** | Custom DatePicker error style. (Style object) | _None_ | | ||
| **`underline`** | If TextArea style is an underline. | _false_ | | ||
| **`defaultStyle`** | If TextArea style is default as seen above. | _true_ | | ||
| **`noStyle`** | If TextArea has no framework defined style. | _false_ | | ||
| **`style`** | Custom TextArea inactive style. (Style object) | _None_ | | ||
| **`activeStyle`** | Custom TextArea active style. (Style object) | _None_ | | ||
| **`errorStyle`** | Custom TextArea error style. (Style object) | _None_ | | ||
| **`errorColor`** | Color of TextArea when validation fails | _error_ | | ||
@@ -342,0 +349,0 @@ ### Molecules |
@@ -10,20 +10,18 @@ import React, { Component } from "react"; | ||
render() { | ||
const { color, children, ...otherProps } = this.props; | ||
const { color, children, outline, ...otherProps } = this.props; | ||
const badgeColor = color; | ||
let badgeStyle = [styles.defaultBadge]; | ||
let badgeStyle = [ | ||
styles.defaultBadge, | ||
{ | ||
borderRadius: 15, | ||
backgroundColor: badgeColor | ||
} | ||
]; | ||
let textStyle = { color: commonColors.white }; | ||
let textStyle = { | ||
color: commonColors.white | ||
}; | ||
let iconColor = commonColors.white; | ||
if (!outline) { | ||
badgeStyle.push({ backgroundColor: color }); | ||
} else { | ||
badgeStyle.push({ backgroundColor: "transparent" }); | ||
textStyle = { color: color }; | ||
iconColor = color; | ||
} | ||
const newChildren = React.Children.map(children, child => | ||
@@ -68,2 +66,3 @@ child && child.type === Text | ||
color: PropTypes.string, | ||
outline: PropTypes.bool, | ||
...View.propTypes | ||
@@ -83,4 +82,5 @@ }; | ||
paddingHorizontal: 10, | ||
paddingVertical: 5 | ||
paddingVertical: 5, | ||
borderRadius: 15 | ||
} | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
207305
964