UNPKG

557 BTypeScriptView Raw
1import React from 'react';
2import { View } from 'react-native';
3import { requireNativeViewManager } from '@unimodules/core';
4
5type Props = {
6 colors: number[];
7 locations?: number[] | null;
8 startPoint?: Point | null;
9 endPoint?: Point | null;
10} & React.ComponentProps<typeof View>;
11
12type Point = [number, number];
13
14export default class NativeLinearGradient extends React.PureComponent<Props> {
15 render() {
16 return <BaseNativeLinearGradient {...this.props} />;
17 }
18}
19
20const BaseNativeLinearGradient = requireNativeViewManager('ExpoLinearGradient');