当我按下我的菜单时,opacity
使按钮文字不可读?如何在onPress
时更改按钮文字?
const LYDTouchableAndroid = props => (
<TouchableOpacity {...props}>
{props.children}
</TouchableOpacity>
);
return (
<LYDTouchable
style={[{ flex: 1 }, marginRightStyle]}
onPress={() => this.props.onPress(square.scene)}>
<LinearGradient
style={styles.square}
colors={theme.gradients.blueGradient}>
<Text style={styles.squareLabel}>
{square.label}
</Text>
</LinearGradient>
</LYDTouchable>
);
};
}
LYDSquaredMenu.defaultProps = {
gradient: theme.gradients.lightBlue,
};
export default LYDSquaredMenu;
const styles = StyleSheet.create({
container: {
backgroundColor: theme.colors.white,
},
row: {
flexDirection: 'row',
marginTop: theme.metrics.buttonsGap,
},
square: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
},
squareLabel: {
...theme.fontStyles.normal,
color: theme.colors.white,
},
});