This repository has been archived on 2026-04-20. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
interaktive-systeme/hooks/useThemeColor.ts
2023-12-30 14:35:05 +01:00

17 lines
No EOL
485 B
TypeScript

import { useColorScheme } from "react-native";
import colors from "../constants/colors";
/**
* @deprecated use Theme context instead
* @param colorName
* @returns
*/
export function useThemeColor(colorName: keyof typeof colors.light & keyof typeof colors.dark): string {
console.warn("useThemeColor is depreciated. Use useTheme().colors instead")
const theme = useColorScheme() ?? "light";
return colors[theme][colorName];
}
export function useUpdateData() {
}