instea/react-native-color-picker

xcode 12 -Ios14 -colorpicker triangle single color inside triangle

Opened this issue · 0 comments

xcode 12
expo init AwesomeProject

    "react-native-color-picker": "^0.6.0",
constructor(props) {
    super(props)
    this.state = { color: toHsv('red') }
    this.onColorChange = this.onColorChange.bind(this)
  }

  onColorChange(color) {
    console.log("color", color)
    this.setState({ color })
  }
 render(){
  return (
       <View style={styles.container}>
        <Text>Open up App.js to start working on your app!</Text>
        <StatusBar style="auto" />
        <View style={{flex: 1, padding: 45, backgroundColor: "#212021"}}>
          <Text style={{color: "white"}}>
            React Native Color Picker - Controlled
          </Text>
          <TriangleColorPicker
            oldColor="purple"
            color={this.state.color}
            onColorChange={this.onColorChange}
            onColorSelected={color => alert(`Color selected: ${color}`)}
            onOldColorSelected={color => alert(`Old color selected: ${color}`)}
            style={{flex: 1}}
          />
        </View>
      </View>

Screen Shot 2020-09-23 at 4 38 32 pm