Function: useTypography()
useTypography():
object
Defined in: hooks/useTypography.ts:41
Hook to access and manage typography configuration and styles.
Returns
object
Object containing typography utilities
typographyConfig
typographyConfig:
TypographyConfig
getTypographyStyle()
getTypographyStyle: (
key
) =>object
Parameters
key
string
= typographyConfig.default
Returns
object
Examples
const MyComponent = () => {
const { getTypographyStyle } = useTypography();
return (
<Text style={getTypographyStyle('heading1')}>
Large Heading
</Text>
);
};
const MyComponent = () => {
const { typographyConfig, getTypographyStyle } = useTypography();
return (
<View>
<Text style={getTypographyStyle('heading1')}>Title</Text>
<Text style={getTypographyStyle('body')}>Body text</Text>
<Text style={getTypographyStyle('caption')}>Caption</Text>
</View>
);
};