react-native-dynamic-shimmer
Version:
Shimmer component wrapper for React Native apps
14 lines (13 loc) • 749 B
TypeScript
import type { ShimmerProps } from './ShimmerTypes';
/**
* Shimmer component that wraps child components and displays a loading state.
*
* @param {Object} props - The props for the Shimmer component.
* @param {React.ReactNode} props.children - The child components to render.
* @param {boolean} props.loading - Indicates if the shimmer is in loading state.
* @param {React.ReactElement} props.shimmerElement - The gradient element used for the shimmer effect.
* @param {number} props.duration - The duration of the shimmer effect animation
* @returns {React.ReactNode} - The rendered children or shimmer view.
*/
declare const Shimmer: ({ children, loading, shimmerElement, duration, }: ShimmerProps) => JSX.Element;
export default Shimmer;