diff options
| author | jciespuertodelacruz <jc.iespuertodelacruz@gmx.es> | 2026-01-20 08:49:52 +0000 |
|---|---|---|
| committer | jciespuertodelacruz <jc.iespuertodelacruz@gmx.es> | 2026-01-20 08:49:52 +0000 |
| commit | c6f2b6f85d151d6d2a2cc68eb05edd7a1e448106 (patch) | |
| tree | 1080219bee426d5d1372da6c31f138482c1544d7 /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.tsx | 14 |
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} />; +} |