UNPKG

585 BTypeScriptView Raw
1import * as React from 'react';
2import { View } from 'react-native';
3
4import { NativeLinearGradientProps } from './NativeLinearGradient.types';
5
6// This is a shim view for platforms that aren't supported by Expo.
7// The component and prop types should match all of the other platform variations.
8export default function NativeLinearGradient(props: NativeLinearGradientProps): React.ReactElement {
9 const { colors, locations, startPoint, endPoint, ...viewProps } = props;
10 console.warn('LinearGradient is not available on this platform');
11 return <View {...(viewProps as any)} />;
12}