Below is the code snippet I am working with utilizing the Text
and Button
components provided by react-native-paper
:
<Text>See also </Text>
<Button mode="text" compact onPress={this.nav( name )}>Compass</Button>
<Text> on how to use the Compass.</Text>
When this is displayed, it looks like:
https://i.stack.imgur.com/lWpub.png
If I swap out the Button
for TouchableOpacity
or a similar component, the layout changes to this:
https://i.stack.imgur.com/EEgBF.png
Is there a way to adjust the styling of the Button
or TouchableOpacity
so that it aligns better with the surrounding text?
UPDATE
After implementing the solution provided by @RajendranNadar and making adjustments to make it compatible with android devices:
See also <Pressable onPress={() => alert('Hello :)')}><Text style={styles.text}>Compass</Text></Pressable> on how to use the Compass.
The outcome is as shown below: