Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

ThemedView.tsx 468B

1234567891011121314
  1. import { View, type ViewProps } from 'react-native';
  2. import { useThemeColor } from '@/hooks/useThemeColor';
  3. export type ThemedViewProps = ViewProps & {
  4. lightColor?: string;
  5. darkColor?: string;
  6. };
  7. export function ThemedView({ style, lightColor, darkColor, ...otherProps }: ThemedViewProps) {
  8. const backgroundColor = useThemeColor({ light: lightColor, dark: darkColor }, 'background');
  9. return <View style={[{ backgroundColor }, style]} {...otherProps} />;
  10. }