theme changes

This commit is contained in:
Thomas Schleicher 2023-11-30 19:51:32 +01:00
parent 1771f85ac3
commit 74c0fdb27e
5 changed files with 52 additions and 66 deletions

7
hooks/hooks.ts Normal file
View file

@ -0,0 +1,7 @@
import { useColorScheme } from "react-native";
import colors from "../constants/colors"
export function useThemeColor(colorName: keyof typeof colors.light & keyof typeof colors.dark): string {
const theme = useColorScheme() ?? "light";
return colors[theme][colorName];
}