mirror of
https://github.com/aliasvault/aliasvault.git
synced 2026-03-22 00:23:53 -04:00
16 lines
463 B
TypeScript
16 lines
463 B
TypeScript
import { useColorScheme as _useColorScheme } from 'react-native';
|
|
import { Colors } from '@/constants/Colors';
|
|
|
|
export type ColorSchemeName = 'light' | 'dark';
|
|
|
|
// Re-export the basic color scheme hook
|
|
export const useColorScheme = () => {
|
|
return _useColorScheme() as ColorSchemeName;
|
|
};
|
|
|
|
// Simple hook that returns the current theme's colors
|
|
export const useColors = () => {
|
|
const colorScheme = useColorScheme();
|
|
return Colors[colorScheme ?? 'light'];
|
|
};
|