import * as React from 'react'; import * as placeholders from './placeholders'; declare type CommonProps = { children: React.ReactNode; /** pass `true` when the content is ready and `false` when it's loading */ ready: boolean; /** delay in millis to wait when passing from ready to NOT ready */ delay?: number; /** if true, the placeholder will never be rendered again once ready becomes true, even if it becomes false again */ firstLaunchOnly?: boolean; className?: string; style?: React.CSSProperties; }; declare type PlaceholderProps = CommonProps & { color?: string; rows?: number; showLoadingAnimation?: boolean; customPlaceholder?: undefined; }; declare type CustomPlaceholderProps = CommonProps & { /** pass any renderable content to be used as placeholder instead of the built-in ones */ customPlaceholder?: React.ReactElement<{ [k: string]: any; }> | null; type?: undefined; rows?: undefined; color?: undefined; showLoadingAnimation?: boolean; }; declare type MediaPlaceholderProps = PlaceholderProps & Omit, 'color' | 'rows' | 'children'> & { type: 'media'; }; declare type RectPlaceholderProps = PlaceholderProps & Omit, 'children'> & { type: 'rect'; }; declare type RoundPlaceholderProps = PlaceholderProps & Omit, 'color' | 'children'> & { type: 'round'; }; declare type TextPlaceholderProps = PlaceholderProps & Omit, 'color' | 'rows' | 'children'> & { type: 'text'; }; declare type TextRowPlaceholderProps = PlaceholderProps & Omit, 'color' | 'children'> & { type: 'textRow'; }; export declare type Props = MediaPlaceholderProps | RectPlaceholderProps | RoundPlaceholderProps | TextRowPlaceholderProps | TextPlaceholderProps | CustomPlaceholderProps; declare const ReactPlaceholder: React.FC; export default ReactPlaceholder;