Skip to content
Source
Sign inSign up

useAndroidControlSizing.ts

12 lines528 Bytes

1import { Platform } from "react-native";
2​
3import { useAppearancePreferences } from "../../features/settings/appearance/AppearancePreferencesProvider";
4import { DEFAULT_BASE_FONT_SIZE } from "../../lib/appearancePreferences";
5import { resolveAndroidControlSizing } from "../../lib/androidControlSizing";
6​
7export function useAndroidControlSizing() {
8 const { appearance } = useAppearancePreferences();
9 return resolveAndroidControlSizing(
10 Platform.OS === "android" ? appearance.baseFontSize : DEFAULT_BASE_FONT_SIZE,
11 );