Files
mariani_mobile/components/themed-view.tsx
leonardo e5270239e1 Initial commit
Generated by create-expo-app 3.5.3.
2025-12-03 11:33:48 +01:00

15 lines
470 B
TypeScript

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