HoshiAI-app/components/themed-view.tsx
2026-01-02 15:58:21 +01:00

15 lines
477 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 }, 'defaultBackground');
return <View style={[{ backgroundColor }, style]} {...otherProps} />;
}