react-native-button-sample
v1.0.0
Published
### Use npm install react-native-button-sample —save to install the button from Node.js. Then, import RNButton from "react-native-button-sample" in the JavaScript files of your app to require it.
Downloads
3
Readme
React Native Simple Button
Use npm install react-native-button-sample —save to install the button from Node.js. Then, import RNButton from "react-native-button-sample" in the JavaScript files of your app to require it.
Installation
$ npm install react-native-button-sample —save
The solution is implemented in JavaScript so no native module linking is required.
Usage
$ import RNButton from 'react-native-button-sample'
Basic parameters
<RNButton
buttonStyle={{
backgroundColor: 'red',
height: 50,
width: 200,
borderRadius: 10,
alignItems: 'center',
justifyContent: 'center',
}}
buttonTitle={'Button 1'}
btnTextStyle={{
fontSize: 20,
color: 'green',
}}
onPress={() => console.log('button clicked...')}
/>
Props
| Attributes | type | Default | Description | | ------------ | -------- | ------- | ------------------------------------------------------------------------------------------ | | buttonTitle | String | null | Button custom title | | btnTextStyle | String | null | Button text custom styles | | buttonStyle | String | null | Button container custom styles | | onPress | Function | null | Button onPress function. It receives a next argument when the progress prop is set to true | | disabled | Boolean | false | Button disabled state: cancle onPress func |