@sinchsmb/ui-kit
Version:
UI kit for SinchSMB frontend
34 lines (33 loc) • 1.13 kB
TypeScript
/// <reference types="react" />
import { CommonProps } from '../../types';
import { SkeletonVariant } from './constants';
/** Props of {@link Skeleton} */
export interface SkeletonProps extends CommonProps {
/**
* A variant of skeleton rounding
*
* @default {@link SkeletonVariant.Rounded}
*/
variant?: SkeletonVariant;
}
/**
* The Skeleton component is used as a placeholder of content (a page or a set of components) before it gets loaded.
* It may be helpful when loading takes a noticeable amount of time.
*
* ```tsx
* const isLoading: boolean;
* isLoading ? <Skeleton /> : <DataComponent />
* ```
*
* <Story id="components-skeleton--default" />
*
* There are three shapes available: `Square`, `Rounded`, and `Circle.`
*
* <Story id="components-skeleton--variants" />
*
* You can use multiple stylized instances of the Skeleton component to emulate an interface of any required fidelity level.
*
* <Story id="components-skeleton-examples--card" />
* <Story id="components-skeleton-examples--user-info" />
*/
export declare function Skeleton(props: SkeletonProps): JSX.Element;