Hey is there a way to set the size of my Button Icon?
<Button
contentStyle={[accordionStyles.header__button, ]}
icon={show === Props.value ? "chevron-up" : "chevron-down"}
direction='rtl'
color='black'
>
...
</Button>
But if i try to size the Button with size={40}
it's not working.
You can do by adding icons as a child, still that feature is not yet developed, they have raised a PR:
import { Button, Text } from 'react-native-paper';
import Icon from 'react-native-vector-icons/FontAwesome';
<Button
style={buttonStyle}
mode="contained"
contentStyle={buttonContentStyle}
>
<Icon name="warning" size={24} color="#fff" />
<View style={{ width: 16, height: 1 }} />
<Text style={buttonTextStyle}>Hello World</Text>
</Button>
hope it helps. feel free for doubts
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With