Reputation: 265
I've been trying to change the background color of a button using this module "react-native-material-desing". In the documentation ("https://github.com/react-native-material-design/react-native-material-design/blob/master/lib/Button.js") they say you have to override the background color and i think im doing it right but for some reason it doesn't work, no errors or nothing simply the color stays default.
heres my button code inside the render.
<Button
onPress={this.gotoNext.bind(this)}
text='Login'
theme = 'dark'
textColor = 'white'
raised={true}
overrides={{backgroundColor: 'red'}}
/>
Any idea or solution? thanks :)
Upvotes: 2
Views: 4781
Reputation: 314
Here is the way to change background color in react-native-material-design.
Please use raised=true
other wise background color is not override.
<Button value="submit"
raised={true}
backgroundColor='#F00'
onPress={//your onPress event here}
text="Submit"/>
Upvotes: 2