1 | export const VALID_FONT_SCALES = __APPLE__
|
2 | ? [0.5, 0.7, 0.85, 1, 1.15, 1.3, 1.5, 2, 2.5, 3, 3.5, 4]
|
3 | : [0.85, 1, 1.15, 1.3];
|
4 | export function getClosestValidFontScale(fontScale) {
|
5 | fontScale = Number(fontScale) || 1;
|
6 | return VALID_FONT_SCALES.sort((a, b) => Math.abs(fontScale - a) - Math.abs(fontScale - b))[0];
|
7 | }
|
8 | export var FontScaleCategory;
|
9 | (function (FontScaleCategory) {
|
10 | FontScaleCategory["ExtraSmall"] = "extra-small";
|
11 | FontScaleCategory["Medium"] = "medium";
|
12 | FontScaleCategory["ExtraLarge"] = "extra-large";
|
13 | })(FontScaleCategory || (FontScaleCategory = {}));
|
14 |
|
\ | No newline at end of file |