Button
Basic button component.
PropTypes
| Prop | Type | Description |
|---|---|---|
| Text.propTypes | object | Properties from Text component |
| label | string | Text to show inside the button |
| iconSource | object or number | Icon image source |
| iconStyle | object, number or array | Icon image style |
| backgroundColor | string | Color of the button background |
| size | string | Size of the button ['large', 'medium', 'small', 'xSmall']. Default 'large' |
| borderRadius | number | Custom border radius. Default BorderRadiuses.br100 |
| onPress | func | Action handler |
| disabled | boolean | Disable interactions for the component |
| outline | boolean | Button will have outline style. Default false. |
| outlineColor | string | The outline color |
| link | boolean | Button will look like a link |
| linkColor | string | Label color for when it's displayed as link |
| labelStyle | object, number, or array | Additional styles for label text |
| fullWidth | boolean | Should the button act as a coast to coast button (no border radius) |
| enableShadow | boolean | Control shadow visibility |
Usage
import {Colors, Button} from 'react-native-ui-lib';
<Button
backgroundColor={Colors.blue20}
label="Get 3 Months Free"
borderRadius={5}
style={{height: 45}}
onPress={() => {}}
/>