Multiple lines in react-native-paper's Button component

67 Views Asked by At

I'm trying to get a flex-based layout inside a button in React Native. Using react-native-paper, I'm able to make it look right on web with a View component inside. But, when I check the UI on Android, the button is empty. Is there a way to make this work?

<Button>
  <View>
    <Text>One</Text>
    <Text>Two</Text>
  </View>
</Button>
1

There are 1 best solutions below

0
Oier Cesat On

I recommand you to use TouchableOpacity instand of Button

<TouchableOpacity >
  <View>
    <Text>One</Text>
    <Text>Two</Text>
  </View>
</TouchableOpacity >