mirror of
https://github.com/zimplexing/OrionTV.git
synced 2026-05-21 01:13:33 +08:00
Update
This commit is contained in:
22
components/ThemedView.tsx
Normal file
22
components/ThemedView.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
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} />;
|
||||
}
|
||||
Reference in New Issue
Block a user