3

Suppose you have a button and the size of the button is perfect, but the text size doesnt match the size of the button.

How should i go about increasing the size of the Button text. Within the documentation it says to use, StyleProp<TextStyle>, ive been trying to use this but i feel like i lack the proper understanding.

A point in the right direction would be appreciated.

<Button
  status="control"
  appearance="ghost"
  size="giant"
> title </Button>

Ahmed Ali
  • 105
  • 2
  • 10

3 Answers3

2

I suppose you use custom font which doesn't look great with default configuration provided by Eva. However, you have two options here. Providing text styles through the textStyle prop, or modifying mapping as I mentioned in related github issue.

artyorsh
  • 372
  • 1
  • 2
  • 6
2

The button and its inner views can be styled by passing them as functional components.

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

<Button style={...}>
  {evaProps => <Text {...evaProps} style={{color: "red"}}>BUTTON</Text>}
</Button>
p8ul
  • 2,212
  • 19
  • 19
0

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

Here is solution, you can change it by changing size='giant' for example, and set height and width of button in you styles, the text size will stay big from property size.

Or at the end of url is how to make it flexible for your code, if first option is not good solution.

I had same problem :)

Dima Malko
  • 227
  • 2
  • 19