1.0.7 • Published 8 years ago
react-jpc-toggle-btn v1.0.7
Toggle button for react native
Usage
Install with npm
npm install react-jpc-toggle-btnIn your project
Import the library
import ToggleBtn from 'react-jpc-toggle-btn'You can use it in anywhere
<ToggleBtn onLabel="ON" offLabel="OFF" offColor="#ccc" onColor="#6eddd9" />By adding the onPress attribut you can get the button status
getToggleStatus = (state) => {
console.log(state)
}Full example
<ToggleBtn onPress={this.getToggleStatus} onLabel="ON" offLabel="OFF" offColor="#ccc" onColor="#6eddd9" />
License
MIT