mirror of
https://github.com/kennethnym/aris.git
synced 2026-03-20 17:11:17 +00:00
15 lines
459 B
TypeScript
15 lines
459 B
TypeScript
|
|
import { View, type ViewProps } from "react-native"
|
||
|
|
|
||
|
|
import { useThemeColor } from "@/hooks/use-theme-color"
|
||
|
|
|
||
|
|
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} />
|
||
|
|
}
|