1.0.0 • Published 1 year ago

react-native-button-sample v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

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

AttributestypeDefaultDescription
buttonTitleStringnullButton custom title
btnTextStyleStringnullButton text custom styles
buttonStyleStringnullButton container custom styles
onPressFunctionnullButton onPress function. It receives a next argument when the progress prop is set to true
disabledBooleanfalseButton disabled state: cancle onPress func
1.0.0

1 year ago