我开始学习 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
}
})
这不起作用,按钮仍然是全宽的。需要一些帮助。