react-native-button-sample

1.0.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i react-native-button-sample

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

2.5 kB

Total Files

3

Last publish

Collaborators

  • brijeshnv