decord/stable/source/modules/themes/getSystemTheme.native.tsx

26 lines
753 B
TypeScript
Raw Permalink Normal View History

2026-10-06 22:12:49 +00:00
// Module ID: 1231
// Function ID: 1232
// Name: getSystemTheme
2026-10-06 22:12:49 +00:00
// Dependencies: [17, 1197, 2]
// Exports: default
2026-10-06 22:12:49 +00:00
// Module 1231 (getSystemTheme)
import react_native from "react-native" /* 17 */;
import ThemeConstants from "ThemeConstants" /* 1197 */;
import size from "module_2" /* 2 */;
2026-10-06 22:12:49 +00:00
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;
}
};