theme changes
This commit is contained in:
parent
1771f85ac3
commit
74c0fdb27e
5 changed files with 52 additions and 66 deletions
7
hooks/hooks.ts
Normal file
7
hooks/hooks.ts
Normal 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];
|
||||
}
|
||||
Reference in a new issue