-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathCard.stories.tsx
129 lines (127 loc) · 3.82 KB
/
Card.stories.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
import { Card } from '../Card';
export default {
title: 'AG—React (Beta)/Card',
component: Card,
};
export const All = () => (
<>
<Card>
<>
<div className="p16">Default</div>
<div className="p16">Card</div>
</>
</Card>
<div className="mbe24" />
<Card isBorder>
<>
<div className="p16">Border Card</div>
<div className="p16 flex-grow-1 flex-shrink-1" style={{ flexBasis: '50ch' }}>
The card comes with minimal
<span className="quoted">skinning css</span>
and no padding (the padding you see here is from the demo styles). By default Cards have a
flex direction of
{' '}
<i>row</i>
, so each child with a
{' '}
<i>flex</i>
{' '}
rule will get placed as a
sort of column in the row (until the viewport is shrunk below a size that can support the
content's flex-basis; under that it will wrap and thus stack).
</div>
</>
</Card>
<div className="mbe24" />
<Card isBorder isRounded>
<>
<div className="p16">Border & Rounded</div>
<div className="p16 flex-grow-1 flex-shrink-1" style={{ flexBasis: '50ch' }}>
The card comes with minimal
<span className="quoted">skinning css</span>
and no padding (the padding you see here is from the demo styles). By default Cards have a
flex direction of
{' '}
<i>row</i>
, so each child with a
{' '}
<i>flex</i>
{' '}
rule will get placed as a
sort of column in the row (until the viewport is shrunk below a size that can support the
content's flex-basis; under that it will wrap and thus stack).
</div>
</>
</Card>
<div className="mbe24" />
<Card isStacked isBorder>
<>
<div style={{ padding: 24 }}>Stacked (direction column)</div>
<div style={{ padding: 24 }}>Card</div>
</>
</Card>
<div className="mbe24" />
<Card isStacked isShadow>
<>
<div style={{ padding: 24 }}>Stacked with shadow</div>
<div style={{ padding: 24 }}>Card</div>
</>
</Card>
<div className="mbe24" />
<Card isAnimated isShadow isStacked>
<>
<div style={{ padding: 24 }}>Animated, stacked, with shadow</div>
<div style={{ padding: 24 }}>Card</div>
</>
</Card>
<div className="mbe24" />
<Card type="success" isStacked>
<>
<div style={{ padding: 24 }}>Success</div>
<div style={{ padding: 24 }}>Card</div>
</>
</Card>
<div className="mbe24" />
<Card type="success" isRounded isStacked>
<>
<div style={{ padding: 24 }}>Success rounded</div>
<div style={{ padding: 24 }}>Card</div>
</>
</Card>
<div className="mbe24" />
<Card type="info" isStacked>
<>
<div style={{ padding: 24 }}>Info</div>
<div style={{ padding: 24 }}>Card</div>
</>
</Card>
<div className="mbe24" />
<Card type="warning" isStacked>
<>
<div style={{ padding: 24 }}>Warning</div>
<div style={{ padding: 24 }}>Card</div>
</>
</Card>
<div className="mbe24" />
<Card type="error" isStacked>
<>
<div style={{ padding: 24 }}>Error</div>
<div style={{ padding: 24 }}>Card</div>
</>
</Card>
<div className="mbe24" />
<Card isSkinned={false}>
<>
<div style={{ padding: 24 }}>Base Card</div>
<div style={{ padding: 24 }}>No Skin</div>
</>
</Card>
<div className="mbe24" />
<Card css="foo-bar">
<>
<div style={{ padding: 24 }}>Custom CSS Class</div>
<div style={{ padding: 24 }}>Inspect to see the class: foo-bar</div>
</>
</Card>
</>
);