summaryrefslogtreecommitdiff
path: root/components/ThemedView.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'components/ThemedView.tsx')
-rw-r--r--components/ThemedView.tsx17
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} />;
}