react-native-gradient-wrapper
Version:
A flexible React Native gradient wrapper component with animated border and background gradients.
33 lines (32 loc) • 1.07 kB
TypeScript
import React from 'react';
import { ViewStyle, StyleProp } from 'react-native';
type RotationDirection = 'clockwise' | 'anticlockwise' | 'none';
type Props = {
children: React.ReactNode;
style?: StyleProp<ViewStyle>;
contentStyle?: StyleProp<ViewStyle>;
backgroundGradient?: string[];
borderGradient?: string[];
borderTopGradient?: string[];
borderBottomGradient?: string[];
borderLeftGradient?: string[];
borderRightGradient?: string[];
borderWidth?: number;
borderRadius?: number;
backgroundRotation?: RotationDirection;
borderRotation?: RotationDirection;
backgroundRotationSpeed?: number;
borderRotationSpeed?: number;
stopBackgroundAfter?: number;
stopBorderAfter?: number;
onPress?: () => void;
onLongPress?: () => void;
enableFeedback?: boolean;
borderLocations?: number[];
backgroundLocations?: number[];
angle?: number;
theme?: 'light' | 'dark' | 'auto';
animated?: boolean;
};
declare const GradientWrapper: React.FC<Props>;
export default GradientWrapper;