- Created new Expo app with SDK 54+ and Expo Router - Installed and configured NativeWind v5 for Tailwind styling - Upgraded voice-assistant to React 19 for consistency - Kept voice-mobile outside workspace to avoid Metro bundler conflicts - Disabled React Compiler experimental feature for stability Setup includes: - postcss.config.mjs with Tailwind PostCSS plugin - global.css with Tailwind and NativeWind imports - metro.config.js with NativeWind wrapper - lightningcss pinned to 1.30.1 for stability Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
22 lines
537 B
TypeScript
22 lines
537 B
TypeScript
/**
|
|
* Learn more about light and dark modes:
|
|
* https://docs.expo.dev/guides/color-schemes/
|
|
*/
|
|
|
|
import { Colors } from '@/constants/theme';
|
|
import { useColorScheme } from '@/hooks/use-color-scheme';
|
|
|
|
export function useThemeColor(
|
|
props: { light?: string; dark?: string },
|
|
colorName: keyof typeof Colors.light & keyof typeof Colors.dark
|
|
) {
|
|
const theme = useColorScheme() ?? 'light';
|
|
const colorFromProps = props[theme];
|
|
|
|
if (colorFromProps) {
|
|
return colorFromProps;
|
|
} else {
|
|
return Colors[theme][colorName];
|
|
}
|
|
}
|