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 CardProps extends HTMLAttributesWeak, CommonProps {
|
11 | |
12 |
|
13 |
|
14 | media?: React.ReactNode,
|
15 |
|
16 | |
17 |
|
18 |
|
19 | title?: React.ReactNode;
|
20 |
|
21 | |
22 |
|
23 |
|
24 | subTitle?: React.ReactNode;
|
25 |
|
26 | |
27 |
|
28 |
|
29 | actions?: React.ReactNode,
|
30 |
|
31 | |
32 |
|
33 |
|
34 | showTitleBullet?: boolean;
|
35 |
|
36 | |
37 |
|
38 |
|
39 | showHeadDivider?: boolean;
|
40 |
|
41 | |
42 |
|
43 |
|
44 | contentHeight?: string | number;
|
45 |
|
46 | |
47 |
|
48 |
|
49 | extra?: React.ReactNode;
|
50 |
|
51 | |
52 |
|
53 |
|
54 | free?: boolean;
|
55 | hasBorder?: boolean;
|
56 | }
|
57 |
|
58 | export interface CardBulletHeaderProps extends HTMLAttributesWeak, CommonProps {
|
59 | |
60 |
|
61 |
|
62 | title?: React.ReactNode;
|
63 |
|
64 | |
65 |
|
66 |
|
67 | subTitle?: React.ReactNode;
|
68 | |
69 |
|
70 |
|
71 | showTitleBullet?: boolean;
|
72 | |
73 |
|
74 |
|
75 | extra?: React.ReactNode;
|
76 | }
|
77 |
|
78 | export interface CardCollaspeContentProps extends HTMLAttributesWeak, CommonProps {
|
79 | contentHeight?: string | number;
|
80 | }
|
81 | export interface CardCollapseContentProps extends HTMLAttributesWeak, CommonProps {
|
82 | contentHeight?: string | number;
|
83 | }
|
84 |
|
85 | export interface CardHeaderProps extends HTMLAttributesWeak, CommonProps {
|
86 | |
87 |
|
88 |
|
89 | title?: React.ReactNode;
|
90 |
|
91 | |
92 |
|
93 |
|
94 | subTitle?: React.ReactNode;
|
95 |
|
96 | |
97 |
|
98 |
|
99 | extra?: React.ReactNode;
|
100 |
|
101 | |
102 |
|
103 |
|
104 | component?: React.ElementType;
|
105 | }
|
106 |
|
107 | export interface CardContentProps extends HTMLAttributesWeak, CommonProps {
|
108 | |
109 |
|
110 |
|
111 | component?: React.ElementType;
|
112 | }
|
113 |
|
114 | export interface CardMediaProps extends HTMLAttributesWeak, CommonProps {
|
115 | |
116 |
|
117 |
|
118 | component?: React.ElementType;
|
119 | |
120 |
|
121 |
|
122 | image?: string;
|
123 | |
124 |
|
125 |
|
126 | src?: string;
|
127 | }
|
128 |
|
129 | export interface CardActionsProps extends HTMLAttributesWeak, CommonProps {
|
130 | }
|
131 |
|
132 | export interface CardDividerProps extends HTMLAttributesWeak, CommonProps {
|
133 | |
134 |
|
135 |
|
136 | inset?: boolean;
|
137 | }
|
138 |
|
139 | export default class Card extends React.Component<CardProps, any> {
|
140 | static BulletHeader: React.ComponentType<CardBulletHeaderProps>;
|
141 | static CollaspeContent: React.ComponentType<CardCollaspeContentProps>;
|
142 | static CollapseContent: React.ComponentType<CardCollapseContentProps>;
|
143 | static Header: React.ComponentType<CardHeaderProps>;
|
144 | static Content: React.ComponentType<CardContentProps>;
|
145 | static Media: React.ComponentType<CardMediaProps>;
|
146 | static Actions: React.ComponentType<CardActionsProps>;
|
147 | static Divider: React.ComponentType<CardDividerProps>;
|
148 | }
|