blob: fe06be622e54c7c2e9be0c933eaf75b8a3c7b07e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
"use client";
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} />;
}
|