Files
duooomi-ble-sdk/src/components/themed-view.tsx
km2023 0c6e858f11 Initial commit
Generated by create-expo-app 3.5.3.
2026-04-02 15:16:56 +08:00

17 lines
496 B
TypeScript

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