diff options
author | polwex <polwex@sortug.com> | 2025-07-16 09:58:34 +0700 |
---|---|---|
committer | polwex <polwex@sortug.com> | 2025-07-16 09:58:34 +0700 |
commit | dc0ad21f0e857adb87d710dd0f2f9affd0a9cbc9 (patch) | |
tree | 3d556ead415654e03b511b007365bcdff6d612ee /components/ThemedView.tsx | |
parent | 697ed671f394cbd07ea9751fe17f262744d99a49 (diff) |
kinda works
Diffstat (limited to 'components/ThemedView.tsx')
-rw-r--r-- | components/ThemedView.tsx | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/components/ThemedView.tsx b/components/ThemedView.tsx index 4d2cb09..fe06be6 100644 --- a/components/ThemedView.tsx +++ b/components/ThemedView.tsx @@ -1,14 +1,23 @@ -import { View, type ViewProps } from 'react-native'; +"use client"; +import { View, type ViewProps } from "react-native"; -import { useThemeColor } from '@/hooks/useThemeColor'; +import { useThemeColor } from "@/hooks/useThemeColor"; export type ThemedViewProps = ViewProps & { lightColor?: string; darkColor?: string; }; -export function ThemedView({ style, lightColor, darkColor, ...otherProps }: ThemedViewProps) { - const backgroundColor = useThemeColor({ light: lightColor, dark: darkColor }, 'background'); +export function ThemedView({ + style, + lightColor, + darkColor, + ...otherProps +}: ThemedViewProps) { + const backgroundColor = useThemeColor( + { light: lightColor, dark: darkColor }, + "background", + ); return <View style={[{ backgroundColor }, style]} {...otherProps} />; } |