1 | import * as React from 'react';
|
2 | import { SxProps } from '@mui/system';
|
3 | import { OverridableStringUnion } from '@mui/types';
|
4 | import { Theme } from '..';
|
5 | import { OverridableComponent, OverrideProps } from '../OverridableComponent';
|
6 | import { SkeletonClasses } from './skeletonClasses';
|
7 |
|
8 | export interface SkeletonPropsVariantOverrides {}
|
9 |
|
10 | export interface SkeletonOwnProps {
|
11 | |
12 |
|
13 |
|
14 |
|
15 |
|
16 | animation?: 'pulse' | 'wave' | false;
|
17 | |
18 |
|
19 |
|
20 | children?: React.ReactNode;
|
21 | |
22 |
|
23 |
|
24 | classes?: Partial<SkeletonClasses>;
|
25 | |
26 |
|
27 |
|
28 |
|
29 | height?: number | string;
|
30 | |
31 |
|
32 |
|
33 | sx?: SxProps<Theme>;
|
34 | |
35 |
|
36 |
|
37 |
|
38 | variant?: OverridableStringUnion<
|
39 | 'text' | 'rectangular' | 'rounded' | 'circular',
|
40 | SkeletonPropsVariantOverrides
|
41 | >;
|
42 | |
43 |
|
44 |
|
45 |
|
46 | width?: number | string;
|
47 | }
|
48 |
|
49 | export interface SkeletonTypeMap<
|
50 | AdditionalProps = {},
|
51 | RootComponent extends React.ElementType = 'span',
|
52 | > {
|
53 | props: AdditionalProps & SkeletonOwnProps;
|
54 | defaultComponent: RootComponent;
|
55 | }
|
56 |
|
57 |
|
58 |
|
59 |
|
60 |
|
61 |
|
62 |
|
63 |
|
64 |
|
65 |
|
66 |
|
67 | declare const Skeleton: OverridableComponent<SkeletonTypeMap>;
|
68 |
|
69 | export type SkeletonProps<
|
70 | RootComponent extends React.ElementType = SkeletonTypeMap['defaultComponent'],
|
71 | AdditionalProps = {},
|
72 | > = OverrideProps<SkeletonTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
|
73 | component?: React.ElementType;
|
74 | };
|
75 |
|
76 | export default Skeleton;
|