useFontScale
- Description
- Params and Return
- Example
Hook to calculate based on fontScale
Param / Return | Description |
---|---|
param | val: number to calculate by |
returns | a function to calculate 'value' based on fontScale |
How to use the useFontScale component
const fs = useFontScale()
const boxProps: BoxProps = {
backgroundColor: getBgColor(phase, current),
height: fs(theme.dimensions.phaseIndicatorDiameter),
width: fs(theme.dimensions.phaseIndicatorDiameter),
borderRadius: fs(theme.dimensions.phaseIndicatorDiameter),
justifyContent: 'center',
textAlign: 'center',
mr: theme.dimensions.phaseIndicatorRightMargin,
}