Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

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. }