Would be great to have a own property to override the icon color inside a button
https://github.com/callstack/react-native-paper/blob/master/src/components/Button.tsx#L256
Cannot find an example in Material Design guidelines where there are different colours for button text and button icon. Generally, both an icon and text label should clarify action and call attention to a button, which with different colours can be less coherence.
Hey Surely we can, use the color prop
<Button
icon="close"
mode="outlined"
color="#fff"
dark={true}
compact={true}>
Close
</Button>
Hey Surely we can, use the color prop
<Button icon="close" mode="outlined" color="#fff" dark={true} compact={true}> Close </Button>
Yeah, that's for the text color.
But does it have a separate props only for the icon color if the icon is an SVG? (fill)
I think that's the question.
Component reference: https://callstack.github.io/react-native-paper/button.html#contentStyle
Hey Surely we can, use the color prop
<Button icon="close" mode="outlined" color="#fff" dark={true} compact={true}> Close </Button>Yeah, that's for the text color.
But does it have a separate props only for the icon color if the icon is an SVG? (fill)I think that's the question.
Component reference: https://callstack.github.io/react-native-paper/button.html#contentStyle
style={{marginTop: 30, borderColor: '#4688f1'}}
labelStyle={{color: '#fff'}} --> This Line Will Change Icon Color
icon="account-check"
mode="contained"
color="#8f7ee1"
onPress={() => this.checkIfExists()}>
Hey Surely we can, use the color prop
<Button icon="close" mode="outlined" color="#fff" dark={true} compact={true}> Close </Button>Yeah, that's for the text color.
But does it have a separate props only for the icon color if the icon is an SVG? (fill)
I think that's the question.
Component reference: https://callstack.github.io/react-native-paper/button.html#contentStylestyle={{marginTop: 30, borderColor: '#4688f1'}}
labelStyle={{color: '#fff'}} --> This Line Will Change Icon Color
icon="account-check"
mode="contained"
color="#8f7ee1"
onPress={() => this.checkIfExists()}>
According to the code _labelStyle_ is not applied to Icon element: https://github.com/callstack/react-native-paper/blob/f60dd8d2c82afe48406beccf5fb90e64f8ab56cb/src/components/Button.tsx#L281
Go and try once, it works.
You are right this has been added in May last year
https://github.com/callstack/react-native-paper/commit/3c8a33924d70f74195b0b42198356d300be1813c
Most helpful comment
style={{marginTop: 30, borderColor: '#4688f1'}}
labelStyle={{color: '#fff'}} --> This Line Will Change Icon Color
icon="account-check"
mode="contained"
color="#8f7ee1"
onPress={() => this.checkIfExists()}>