“我想将两个按钮的颜色分别更改为RED和Green,但是并没有改变。Tried:Button样式以及 按钮color =“#0088000”>像这样”
*< Card style={styles.cd}
onPress={() =>
alert('vishal')
}
onLongPress={() =>
this.dialogComponent.show()
}
>
<Text style={styles.fil}>Approval request for {item.createdBy} :-: {item.titlePrefix} </Text>
<View style={styles.containerB}>
<Button
color="#0088000"
title="Approve"
onPress ={()=>alert("but1")}
/>
<Button
title="Reject"
onPress ={()=>alert("but2")}
/>
</View>
</Card >*
答案 0 :(得分:1)
您可以尝试删除该值的一个字符。
color =“#0088000” => color =“#088000”或color =“ red”
享受本机反应!