-
Notifications
You must be signed in to change notification settings - Fork 734
[Inspiration screens]: Product Page & Twitter screens #1466
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
Wrote a few comments
<View marginV-s2 paddingV-s2 style={{borderColor: Colors.dark70, borderBottomWidth: 1}}> | ||
<Text dark30>Color</Text> | ||
<TouchableOpacity row centerV spread onPress={()=> this.setState({isColor: true})}> | ||
<View row centerV> | ||
<View style={{width: 14, height: 14, borderRadius: 12, marginRight: 6}} backgroundColor={colorOption.color}/> | ||
<Text dark10 text70>{colorOption.name}</Text> | ||
</View> | ||
<Image source={require('../../../assets/icons/chevronDown.png')}/> | ||
</TouchableOpacity> | ||
</View> | ||
<ActionSheet | ||
title={'Select a Color'} | ||
options={[ | ||
{label: colorOptions.red.name, onPress: () => this.pickOption(colorOptions.red)}, | ||
{label: colorOptions.green.name, onPress: () => this.pickOption(colorOptions.green)}, | ||
{label: colorOptions.blue.name, onPress: () => this.pickOption(colorOptions.blue)}, | ||
]} | ||
visible={isColor} | ||
onDismiss={()=> this.setState({isColor: false})} | ||
/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use the Picker component?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought that Picker doesn't have ActionSheet, but seems like it has in custom options
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, technically you achieve the same behavior with custom item render.
<View marginV-s2 paddingV-s2 style={{borderColor: Colors.dark70, borderBottomWidth: 1}}> | ||
<Text dark30>Size</Text> | ||
<TouchableOpacity row centerV spread onPress={()=> this.setState({isSize: true})}> | ||
<View row centerV> | ||
<Text dark10 text70>{sizeOption.name}</Text> | ||
</View> | ||
<Image source={require('../../../assets/icons/chevronDown.png')}/> | ||
</TouchableOpacity> | ||
</View> | ||
<ActionSheet | ||
title={'Select a Size'} | ||
options={[ | ||
{label: sizeOptions.s.name, onPress: () => this.pickOption(sizeOptions.s)}, | ||
{label: sizeOptions.m.name, onPress: () => this.pickOption(sizeOptions.m)}, | ||
{label: sizeOptions.l.name, onPress: () => this.pickOption(sizeOptions.l)}, | ||
]} | ||
visible={isSize} | ||
onDismiss={()=> this.setState({isSize: false})} | ||
/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, consider using the Picker component
@maeschli Let me know if you still have time to fix my comments. |
Description
Created Demo Screens in Inspiration Screens section
Changelog