UNPKG

react-native-text

Version:

Scalable font size in Text component for React Native

23 lines (22 loc) 689 B
import { FunctionComponent } from 'react'; import { TextStyle, TextProps } from 'react-native'; declare type ScaleText = { deviceBaseWidth?: number; fontSize?: number; lineHeight?: number; realWidth?: number; }; export declare const scaleText: ({ deviceBaseWidth, fontSize, lineHeight, }: ScaleText) => { fontSize: number; lineHeight: number; }; export declare const useScaleText: ({ deviceBaseWidth, fontSize, lineHeight, }: ScaleText) => { fontSize: number; lineHeight: number; }; interface Props extends TextProps { deviceBaseWidth?: number; style?: TextStyle; } declare const ScalableText: FunctionComponent<Props>; export default ScalableText;