Files
AppDev/FastNotes/components/themed-view.tsx
2026-03-06 17:20:41 +01:00

15 lines
463 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} />
}