如何在 react-native-elements 的 'PricingCard' 中制作隐形按钮
How to make Invisible button in 'PricingCard' in react-native-elements
我尝试使用 'react-native-elements' 中的 PricingCard 进行一些更改,例如删除按钮。由于需要按钮元素,所以我尝试使用 buttonStyle 对象使按钮透明。但是,正如您看到的图片,它仍然存在。有什么解决方法吗?
<PricingCard
color="black"
title="2020-05-20 11:00~13:00"
titleStyle={{ fontSize: 24, color: "#f7b731"}}
price="0"
info={["1", "2"]}
button={{
buttonStyle: styles.pricingButtonStyle,
}}
/>
const styles = StyleSheet.create({
pricingButtonStyle: {
backgroundColor: '#00ff0000',
width: 0
},
});
https://react-native-elements.github.io/react-native-elements/docs/1.0.0/pricing.html#button
您可以尝试将按钮的不透明度设置为 0。
const styles = StyleSheet.create({
pricingButtonStyle: {
backgroundColor: '#00ff0000',
width: 0,
opacity: 0
},
});
我尝试使用 'react-native-elements' 中的 PricingCard 进行一些更改,例如删除按钮。由于需要按钮元素,所以我尝试使用 buttonStyle 对象使按钮透明。但是,正如您看到的图片,它仍然存在。有什么解决方法吗?
<PricingCard
color="black"
title="2020-05-20 11:00~13:00"
titleStyle={{ fontSize: 24, color: "#f7b731"}}
price="0"
info={["1", "2"]}
button={{
buttonStyle: styles.pricingButtonStyle,
}}
/>
const styles = StyleSheet.create({
pricingButtonStyle: {
backgroundColor: '#00ff0000',
width: 0
},
});
https://react-native-elements.github.io/react-native-elements/docs/1.0.0/pricing.html#button
您可以尝试将按钮的不透明度设置为 0。
const styles = StyleSheet.create({
pricingButtonStyle: {
backgroundColor: '#00ff0000',
width: 0,
opacity: 0
},
});