Anyone tell me how I make my button to lowercase in react native because I already get the answer in stack overflow but there is using touch opacity and that is the different component of button so I want the answer for button component
When I will type anything in under title props example
title='Hello'
[1] [1]: https://i.stack.imgur.com/UmaBF.png
CodePudding user response:
you can use TouchableOpacity for your button like this:
<TouchableOpacity
onPress={() => onClick}
style={{}}>
<Text
style={{
fontSize: 20,
alignSelf: 'center',
}}>
Hello
</Text>
</TouchableOpacity>
CodePudding user response:
Install react-native-paper
and import Button
from react-native-paper
and make uppercase
prop to false.
import { Button } from 'react-native-paper';
<Button
mode="contained"
uppercase={false}
onPress={() => console.log('Hello')}>
Hello
</Button>