mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
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>
15 lines
468 B
TypeScript
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} />;
|
|
}
|