UNPKG

react-native-gradient-shimmer

Version:

⚛ A pure JavaScript, performant, typed shimmer component for Android and iOS.

57 lines (56 loc) 1.75 kB
import React, { ComponentType } from 'react'; import { EasingFunction, StyleProp, ViewStyle } from 'react-native'; import { LinearGradientPropsType } from './types'; export declare type GradientShimmerPropsType = { testID?: string; /** * Linear gradient component from `expo-linear-gradient` or `react-native-linear-gradient` */ LinearGradientComponent: ComponentType<LinearGradientPropsType>; /** * Component `width` in DPI */ width: number; /** * Component `height` in DPI */ height: number; /** * Styles passed to the LinearGradient component */ style?: StyleProp<ViewStyle>; /** * Background color in HEX or RGB */ backgroundColor?: string; /** * Highlight color in HEX or RGB */ highlightColor?: string; /** * The size of the highlight effect in DPI */ highlightWidth?: number; /** * Duration of the animation in milliseconds */ duration?: number; /** * Start or stop de animation */ animating?: boolean; /** * Easing function used by `Animated.timing()` to convey physically believable motion in animations. Read more at https://reactnative.dev/docs/easing */ easing?: EasingFunction; }; export declare const gradientShimmerDefaultProps: { duration: number; highlightWidth: number; highlightColor: string; backgroundColor: string; animating: boolean; easing: EasingFunction; }; declare const _default: React.MemoExoticComponent<({ duration, highlightWidth, highlightColor, backgroundColor, animating, easing, testID, style, height, width, LinearGradientComponent, }: GradientShimmerPropsType) => JSX.Element>; export default _default;