1 |
|
2 |
|
3 | import * as React from 'react';
|
4 | import CommonProps from '../util';
|
5 |
|
6 | interface HTMLAttributesWeak extends React.HTMLAttributes<HTMLElement> {
|
7 | title?: any;
|
8 | }
|
9 |
|
10 | export interface ItemProps extends Omit<HTMLAttributesWeak, 'content'>, CommonProps {
|
11 | |
12 |
|
13 |
|
14 | state?: "done" | "process" | "error" | "success";
|
15 |
|
16 | |
17 |
|
18 |
|
19 | icon?: string;
|
20 |
|
21 | |
22 |
|
23 |
|
24 | dot?: React.ReactNode;
|
25 |
|
26 | |
27 |
|
28 |
|
29 | time?: React.ReactNode;
|
30 |
|
31 | |
32 |
|
33 |
|
34 | title?: React.ReactNode;
|
35 |
|
36 | |
37 |
|
38 |
|
39 | timeLeft?: React.ReactNode;
|
40 |
|
41 | |
42 |
|
43 |
|
44 | content?: React.ReactNode;
|
45 |
|
46 | |
47 |
|
48 |
|
49 | animation?: boolean;
|
50 | mode?: 'left' | 'alternate';
|
51 | }
|
52 |
|
53 | export class Item extends React.Component<ItemProps, any> {}
|
54 |
|
55 | type foldItem = {
|
56 | |
57 |
|
58 |
|
59 | foldArea?: Array<number>;
|
60 | foldShow?: boolean;
|
61 | }
|
62 |
|
63 | export interface TimelineProps extends React.HTMLAttributes<HTMLElement>, CommonProps {
|
64 | |
65 |
|
66 |
|
67 | prefix?: string;
|
68 |
|
69 | |
70 |
|
71 |
|
72 | fold?: Array<foldItem>;
|
73 |
|
74 | |
75 |
|
76 |
|
77 | className?: string;
|
78 | }
|
79 |
|
80 | export default class Timeline extends React.Component<TimelineProps, any> {
|
81 | static Item: typeof Item;
|
82 | }
|