simple-react-native-color-picker
v1.0.1
Published
started
Downloads
9
Maintainers
Readme
Simple Color Picker
simple color picker ecec or anything you wanna call
Usage
...
import ColorPicker from 'simple-react-native-color-picker';
...
constructor(props){
...
this.state = {colors:['#1abc9c', '#2ecc71', '#3498db', '#9b59b6', '#34495e']};
...
}
_onPress(){
// alert(this.state.colors[this.refs.colorPicker.getIndexSelected()]);
alert(this.refs.colorPicker.getColorSelected());
}
render(){
...
<ColorPicker colors={this.state.colors} ref="colorPicker"/>
<Button title="Get" color="#8e44ad" onPress={this._onPress.bind(this)}/>
...
}
...