The Yes button does not respond to styles. But an alternative solution is that we can use a component of the reaction-native element.
Install the packages mentioned below first.
npm install reactive native elements npm i react native-linear gradient npm i react-native-vector icons
And then import the packages into your code
import { Button } from 'react-native-elements'; import LinearGradient from 'react-native-linear-gradient'; import Icon from 'react-native-vector-icons/FontAwesome'; <Button ViewComponent={LinearGradient} // Don't forget this! linearGradientProps={{ colors: ['#ffffff','blue', 'grey'], start: { x: 0, y: 0.5 }, end: { x: 1, y: 0.5 }, }} onPress={()=> this.props.navigation.navigate('First')} title="Click me"/>
For more information, here is the link: https://react-native-elements.imtqy.com/react-native-elements/docs/button.html
Aaron ebinezer
source share