@department-of-veterans-affairs/mobile-component-library
Version:
VA Design System Mobile Component Library
11 lines (8 loc) • 363 B
text/typescript
import { ColorSchemeName } from 'react-native'
import { Theme, themes } from '@department-of-veterans-affairs/mobile-tokens'
import { useColorScheme } from './useColorScheme'
/** Returns light/dark theme based on useColorScheme */
export function useTheme(): Theme {
const themeName: ColorSchemeName = useColorScheme() || 'light'
return themes[themeName]
}