Files
bun.sh/test/integration/expo-app/components/ThemedView.tsx
Georgijs d9f7d053d5 fix peer hoisting (#11473)
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
Co-authored-by: Georgijs Vilums <=>
Co-authored-by: dylan-conway <dylan-conway@users.noreply.github.com>
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2024-05-31 17:12:33 -07:00

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