UNPKG

@janblazej/react-native-materials

Version:

React Native component for native Material effects

10 lines 518 B
import { requireNativeView } from 'expo'; import * as React from 'react'; import { useColorScheme } from 'react-native'; const NativeView = requireNativeView('Materials'); export default function MaterialView({ variant, ...props }) { const colorScheme = useColorScheme(); const colorSchemeVariant = React.useMemo(() => (variant ? variant : (colorScheme ?? undefined)), [colorScheme, variant]); return <NativeView {...props} variant={colorSchemeVariant}/>; } //# sourceMappingURL=MaterialView.android.js.map