decord/beta/source/modules/themes/getSystemTheme.native.tsx
2026-10-07 22:43:51 +00:00

25 lines
753 B
TypeScript

// Module ID: 1230
// Function ID: 1231
// Name: getSystemTheme
// Dependencies: [17, 1196, 2]
// Exports: default
// Module 1230 (getSystemTheme)
import react_native from "react-native" /* 17 */;
import ThemeConstants from "ThemeConstants" /* 1196 */;
import size from "module_2" /* 2 */;
const Appearance = react_native.Appearance;
const SystemTheme = ThemeConstants.SystemTheme;
const result = size.fileFinishedImporting("modules/themes/getSystemTheme.native.tsx");
export default function getSystemTheme() {
const colorScheme = Appearance.getColorScheme();
if ("light" === colorScheme) {
return SystemTheme.LIGHT;
} else if ("dark" === colorScheme) {
return SystemTheme.DARK;
} else {
return SystemTheme.NO_PREFERENCE;
}
};