From 83643a78b73dee5610be6ad9837fb72e9b944cb7 Mon Sep 17 00:00:00 2001
From: Santo Cariotti <santo@dcariotti.me>
Date: Wed, 28 Aug 2024 15:53:21 +0200
Subject: Initial commit

Generated by create-expo-app 3.0.0.
---
 components/ThemedView.tsx | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 components/ThemedView.tsx

(limited to 'components/ThemedView.tsx')

diff --git a/components/ThemedView.tsx b/components/ThemedView.tsx
new file mode 100644
index 0000000..4d2cb09
--- /dev/null
+++ b/components/ThemedView.tsx
@@ -0,0 +1,14 @@
+import { View, type ViewProps } from 'react-native';
+
+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');
+
+  return <View style={[{ backgroundColor }, style]} {...otherProps} />;
+}
-- 
cgit v1.2.3-18-g5258

