summaryrefslogtreecommitdiffstats
path: root/components/themed-view.tsx
diff options
context:
space:
mode:
authorjciespuertodelacruz <jc.iespuertodelacruz@gmx.es>2026-01-20 08:49:52 +0000
committerjciespuertodelacruz <jc.iespuertodelacruz@gmx.es>2026-01-20 08:49:52 +0000
commitc6f2b6f85d151d6d2a2cc68eb05edd7a1e448106 (patch)
tree1080219bee426d5d1372da6c31f138482c1544d7 /components/themed-view.tsx
Initial commit
Generated by create-expo-app 3.5.3.
Diffstat (limited to 'components/themed-view.tsx')
-rw-r--r--components/themed-view.tsx14
1 files changed, 14 insertions, 0 deletions
diff --git a/components/themed-view.tsx b/components/themed-view.tsx
new file mode 100644
index 0000000..6f181d8
--- /dev/null
+++ b/components/themed-view.tsx
@@ -0,0 +1,14 @@
+import { View, type ViewProps } from 'react-native';
+
+import { useThemeColor } from '@/hooks/use-theme-color';
+
+export type ThemedViewProps = ViewProps & {
+ lightColor?: string;
+ darkColor?: string;
+};
+
+export function ThemedView({ style, lightColor, darkColor, ...otherProps }: ThemedViewProps) {
+ const backgroundColor = useThemeColor({ light: lightColor, dark: darkColor }, 'background');
+
+ return <View style={[{ backgroundColor }, style]} {...otherProps} />;
+}