xtablo-source/xtablo-expo/components/ThemedView.tsx
Arthur Belleville 75328fbe96
Format codebase
2025-10-10 08:50:56 +02:00

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