UNPKG

1.09 kBTypeScriptView Raw
1import * as React from 'react';
2import type { AvatarProps } from './Avatar';
3import SkeletonAvatar from './Avatar';
4import SkeletonButton from './Button';
5import SkeletonNode from './Node';
6import SkeletonImage from './Image';
7import SkeletonInput from './Input';
8import type { SkeletonParagraphProps } from './Paragraph';
9import type { SkeletonTitleProps } from './Title';
10interface SkeletonAvatarProps extends Omit<AvatarProps, 'active'> {
11}
12export interface SkeletonProps {
13 active?: boolean;
14 loading?: boolean;
15 prefixCls?: string;
16 className?: string;
17 style?: React.CSSProperties;
18 children?: React.ReactNode;
19 avatar?: SkeletonAvatarProps | boolean;
20 title?: SkeletonTitleProps | boolean;
21 paragraph?: SkeletonParagraphProps | boolean;
22 round?: boolean;
23}
24type CompoundedComponent = {
25 Button: typeof SkeletonButton;
26 Avatar: typeof SkeletonAvatar;
27 Input: typeof SkeletonInput;
28 Image: typeof SkeletonImage;
29 Node: typeof SkeletonNode;
30};
31declare const Skeleton: React.FC<SkeletonProps> & CompoundedComponent;
32export default Skeleton;