1.0.7 • Published 8 years ago

react-jpc-toggle-btn v1.0.7

Weekly downloads
5
License
MIT
Repository
github
Last release
8 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

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago