Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

useControlTheme.ts

13 lines482 Bytes

1import { useAppearancePreferences } from "../../features/settings/appearance/AppearancePreferencesProvider";
2​
3/** Palette and type size for native controls hosted outside the RN style tree. */
4export function useControlTheme() {
5 const { themeAppearance, themeVariables, systemColorsActive, appearance } =
6 useAppearancePreferences();
7 return {
8 colorScheme: themeAppearance,
9 colors: themeVariables,
10 systemColorsActive,
11 fontSize: appearance.baseFontSize,
12 };