Button
Buttons are touchable elements used to interact with the screen and to perform and operation. They may display text, icons, or both.
How to use
import React from 'react';
import {Button} from '@gyri/native-ui-components';
const MyComponent = () => (
<Button onPress={() => console.log('Pressed')}>
Press me
</Button>
);
export default MyComponent;
Props
| # | Name | Data type | Default value | Values | Description |
|---|---|---|---|---|---|
| 1 | mode | string | 'text' | 'text', 'outlined' | |
| 2 | disabled | boolean | true | false , false | |
| 3 | onPress | function | |||
| 4 | buttonColor | string | Custom button's background color. | ||
| 5 | textColor | string | Custom button's text color. | ||
| 6 | rippleColor | Color of the ripple effect. | |||
| 7 | loading | boolean | Whether to show a loading indicator. | ||
| 8 | icon | Icon to display for the Button. | |||
| 9 | disabled | boolean | A disabled button is greyed out and onPress is not called on touch. | ||
| 10 | uppercase | boolean | Make the label text uppercased. | ||
| 11 | labelStyle | Style for the button text. | |||
| 12 | contentStyle | Style of button's inner content. |
For More details https://callstack.github.io/react-native-paper/docs/components/Button/