Issue
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.
Solution
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
Answered By - Gaurav Roy
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.