diff options
author | polwex <polwex@sortug.com> | 2025-07-15 17:20:58 +0700 |
---|---|---|
committer | polwex <polwex@sortug.com> | 2025-07-15 17:20:58 +0700 |
commit | a528bd94a6e8e25010ae26a305550b211df0ddc6 (patch) | |
tree | 887425ddc3160ae023292dfefc49d77c2eb8dcec /components/ThemedView.tsx |
Initial commit
Generated by create-expo 3.4.3.
Diffstat (limited to 'components/ThemedView.tsx')
-rw-r--r-- | components/ThemedView.tsx | 14 |
1 files changed, 14 insertions, 0 deletions
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} />; +} |