【发布时间】:2020-07-04 04:35:30
【问题描述】:
我开始学习 react-native-paper,我不确定如何修复按钮宽度,目前它会填满整个父容器。
<View>
<Button
icon="camera"
mode="contained"
onPress={() => console.log('Pressed')}
contentStyle={styles.btn}
>
Press me
</Button>
</View>
const styles = StyleSheet.create({
btn: {
width: 30
}
})
这不起作用,按钮仍然是全宽的。 需要一些帮助。
【问题讨论】:
标签: react-native react-native-paper