Skip to content

ColorPicker - Remove UNSAFE method #940

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Nov 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 25 additions & 9 deletions demo/src/screens/componentScreens/ColorPickerScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,24 @@ export default class ColorPickerScreen extends Component {
return (
<ScrollView style={styles.container} contentContainerStyle={{paddingBottom: 20}}>
<View center bg-white marginV-10>
<Text text60 margin-10 style={{color}}>Selected Color: {color}</Text>
<Text text60 margin-10 style={{color}}>
Selected Color: {color}
</Text>
<View center marginB-10 style={{height: 50, width: 200, backgroundColor: color}}>
<Text text60 style={{color: textColor}}>{color}</Text>
<Text text60 style={{color: textColor}}>
{color}
</Text>
</View>
</View>
<View bg-white>
<Text text60 marginL-20 marginB-4 marginT-24>Theme Color</Text>
<Text text60 marginL-20 marginB-4 marginT-24>
Theme Color
</Text>
<Text marginL-20>Choose a color for your place’s theme.</Text>
<ColorPalette value={paletteValue} onValueChange={this.onPaletteValueChange} colors={colors}/>
<Text marginL-20 marginT-16>Custom Colors</Text>
<ColorPalette value={paletteValue} onValueChange={this.onPaletteValueChange} colors={colors} />
<Text marginL-20 marginT-16>
Custom Colors
</Text>
<ColorPicker
initialColor={color}
colors={customColors}
Expand All @@ -82,11 +90,19 @@ export default class ColorPickerScreen extends Component {
</View>

<View marginV-10 bg-white>
<Text center text60 marginT-10>Color Name</Text>
<Text center text60 marginT-10>
Color Name
</Text>
<View spread row margin-10 style={{backgroundColor: nearestColor}}>
<Text margin-5 text70 style={{color: textColor}}>{nearestColor}</Text>
<Text margin-5 text60 style={{color: textColor}}>{colorName}</Text>
<Text margin-5 text70 style={{color: textColor}}>{isMapped}</Text>
<Text margin-5 text70 style={{color: textColor}}>
{nearestColor}
</Text>
<Text margin-5 text60 style={{color: textColor}}>
{colorName}
</Text>
<Text margin-5 text70 style={{color: textColor}}>
{isMapped}
</Text>
</View>
</View>
</ScrollView>
Expand Down
Loading