Text component that uses Text
, Title
and Caption
components from react-native-paper
alongside react-native-size-matters
for scalable text size. Also adding line height based on size to fix text cuts on iPad.
import React from 'react';
import { View } from 'react-native';
import { Text } from 'roqay-react-native-common-components';
const MyComponent = () => {
return (
<View>
<Text>Normal Text</Text>
<Text type="bold">Bold Text</Text>
<Text type="caption">Caption Text</Text>
</View>
);
};
Type: number
Default value: 11
for type caption
, 13
for type normal
and 15
for type bold
Determines the font size of the text.
Type: 'caption' | 'normal' | 'bold'
Default value: 'normal'
Determines the type of the text.