myjourney/components/ThemedView.tsx
2025-06-21 14:53:56 -07:00

16 lines
444 B
TypeScript

import { View, type ViewProps } from 'react-native';
import { useTheme } from 'react-native-paper';
export type ThemedViewProps = ViewProps & {
lightColor?: string;
darkColor?: string;
};
export function ThemedView({ style, lightColor, darkColor, ...otherProps }: ThemedViewProps) {
const theme = useTheme();
const backgroundColor = theme.colors.background;
return <View style={[{ backgroundColor }, style]} {...otherProps} />;
}