Files
mcbeno-app/components/ThemedView.tsx
b3ni15 84c5ee7a7f Initial commit
Generated by create-expo-app 3.4.2.
2025-07-26 23:59:20 +02:00

15 lines
468 B
TypeScript

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} />;
}