UNPKG

1 kBTypeScriptView Raw
1import * as React from 'react';
2import { OverridableComponent, OverrideProps } from '@material-ui/core/OverridableComponent';
3
4export interface SkeletonTypeMap<P = {}, D extends React.ElementType = 'span'> {
5 props: P & {
6 animation?: 'pulse' | 'wave' | false;
7 children?: React.ReactNode;
8 height?: number | string;
9 variant?: 'text' | 'rect' | 'circle';
10 width?: number | string;
11 };
12 defaultComponent: 'div';
13 classKey: SkeletonClassKey;
14}
15
16/**
17 *
18 * Demos:
19 *
20 * - [Skeleton](https://mui.com/components/skeleton/)
21 *
22 * API:
23 *
24 * - [Skeleton API](https://mui.com/api/skeleton/)
25 */
26declare const Skeleton: OverridableComponent<SkeletonTypeMap>;
27
28export type SkeletonClassKey =
29 | 'root'
30 | 'text'
31 | 'rect'
32 | 'circle'
33 | 'pulse'
34 | 'wave'
35 | 'withChildren'
36 | 'fitContent'
37 | 'heightAuto';
38
39export type SkeletonProps<
40 D extends React.ElementType = SkeletonTypeMap['defaultComponent'],
41 P = {}
42> = OverrideProps<SkeletonTypeMap<P, D>, D>;
43
44export default Skeleton;