0

How do I change the color of button text using the react native library?

I've tried it with the following code.

    // styles
    button:
    {
        marginTop: 15,
        marginLeft: lrMargin,
        marginRight: lrMargin,
        color: 'white'
    }

                    <Button 
                        style={styles.button} 
                        status='basic'
                        color="red"
                        textColor="red"
                    >

                        LOGIN

                    </Button>
TheMan68
  • 1,429
  • 6
  • 26
  • 48

2 Answers2

0

Button and it's inner views can be styled by passing them as function components.

import { Button, Text } from '@ui-kitten/components';

<Button style={...}>
  {evaProps => <Text {...evaProps}>BUTTON</Text>}
</Button>

source link:- https://akveo.github.io/react-native-ui-kitten/docs/components/button/overview#button

-1

You can use the textStyle prop. For example,

<Button textStyle={{color:'red'}}>LOGIN</Button>
borthrop
  • 9
  • 5