1.0.7 • Published 7 years ago

react-jpc-toggle-btn v1.0.7

Weekly downloads
5
License
MIT
Repository
github
Last release
7 years ago

Toggle button for react native

Usage

Install with npm

npm install react-jpc-toggle-btn

In 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" />

Image

License

MIT

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago