@chainplatform/colorpicker
v0.1.0
Published
@chainplatform/colorpicker is a React Native library implement for react-native and react-native-web support select color.
Downloads
8
Maintainers
Readme
Color Picker
@chainplatform/colorpicker is a React Native library implement for react-native and react-native-web support select color.
Install
npm install @chainplatform/colorpicker --save
or
yarn add @chainplatform/colorpicker
Usage
import React from 'react';
import ColorPicker from '@chainplatform/colorpicker';
class App extends React.Component {
constructor(props) {
super(props);
this.state = {
};
}
setColor(datas) {
console.log("datas ", datas);
}
render() {
return (
<View style={{flex:1}}>
<ColorPicker
default_color={"#FEFEFE"}
key_color={"primary"}
key_theme={"light"}
getColor={(datas) => { this.setColor(datas); }}
containerStyle={
`height: ${styles.s37}px;
border-width: ${styles.s0}px;
width: ${styles.s37}px;
border-radius: ${styles.s0}px;
background-color: ${this.props.theme.colors.card};`
} />
</View>
);
}
}