UNPKG

1.21 kBTypeScriptView Raw
1/// <reference types="react" />
2
3import * as React from 'react';
4import CommonProps from '../util';
5
6export interface LoadingProps extends React.HTMLAttributes<HTMLElement>, CommonProps {
7 /**
8 * 样式前缀
9 */
10 prefix?: string;
11
12 /**
13 * 自定义内容
14 */
15 tip?: React.ReactNode;
16
17 /**
18 * 自定义内容位置
19 */
20 tipAlign?: 'right' | 'bottom';
21
22 /**
23 * loading 状态, 默认 true
24 */
25 visible?: boolean;
26
27 /**
28 * 自定义class
29 */
30 className?: string;
31
32 /**
33 * 自定义内联样式
34 */
35 style?: React.CSSProperties;
36
37 /**
38 * 设置动画尺寸
39 */
40 size?: 'large' | 'medium';
41
42 /**
43 * 自定义动画内容
44 */
45 indicator?: React.ReactNode;
46
47 /**
48 * 动画颜色
49 */
50 color?: string;
51
52 /**
53 * 全屏展示
54 */
55 fullScreen?: boolean;
56 /**
57 * 是否禁用滚动,仅在 fullScreen 模式下生效
58 */
59 disableScroll?: boolean;
60 /**
61 * 子元素
62 */
63 children?: React.ReactNode;
64
65 /**
66 * should loader be displayed inline
67 */
68 inline?: boolean;
69}
70
71export default class Loading extends React.Component<LoadingProps, any> {}