-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathbootstrap.card.js
115 lines (105 loc) · 3.07 KB
/
bootstrap.card.js
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
import devboard from '../';
import React from 'react';
import { sourceLink } from './misc';
import Label from './Label';
import Button from './Button';
import ProgressBar from './ProgressBar';
import Accordion from './Accordion';
import Panel from './Panel';
var definecard = devboard.ns('3. Bootstrap Example', { toc: true });
definecard(`
This page is intended to give you an overview of what it might be like to use
Devboard to build an interactive style guide for your component library.
`);
sourceLink(definecard, __dirname, __filename);
definecard(
'Labels',
`
A simple display of bootstrap labels.
* default
* primary
* success
* info
* warning
* danger
`,
(
<div>
<Label kind="default">default</Label>
<Label kind="primary">primary</Label>
<Label kind="success">success</Label>
<Label kind="info">info</Label>
<Label kind="warning">warning</Label>
<Label kind="danger">danger</Label>
<Label kind="link">link</Label>
</div>
)
);
definecard(
'Buttons',
`
A simple display of bootstrap buttons.
* default
* primary
* success
* info
* warning
* danger
* link
`,
<div style={{textAlign: 'center'}}>
<Button kind="default">default</Button>
<Button kind="primary">primary</Button>
<Button kind="success">success</Button>
<Button kind="info">info</Button>
<Button kind="warning">warning</Button>
<Button kind="danger">danger</Button>
<Button kind="link">link</Button>
</div>
);
definecard(
'Progress Bars',
`
A variety of progress bars
`,
({state}) => <div>
<ProgressBar n={40} label />
<ProgressBar n={60} type="success" />
<ProgressBar n={35} type="danger" striped />
<ProgressBar n={70} type="warning" striped animated />
<ProgressBar n={state} type="info" label striped animated />
</div>,
{
state: 0,
onTick: ({setState}) => setState(s => (s + 1) % 100),
tickInterval: 200
}
);
definecard(
'Accordion',
`
This component has some internal state. If hot reloading is
configured correctly then the state will be preserved when the
\`<Accordion>\` component's definition is changed.
`,
<Accordion>
<Panel title="Group 1">
Th’art nesh thee nay lad soft lad wacken thi sen up t’foot o’
our stairs. Nay lad where’s tha bin. Th’art nesh thee a pint
‘o mild any rooad t’foot o’ our stairs.
</Panel>
<Panel title="Group 2">
Where there’s muck there’s brass t’foot o’ our stairs ah’ll
gi’ thee a thick ear. Ah’ll learn thi tintintin tell thi
summat for nowt soft lad mardy bum. Chuffin’ nora ah’ll box
thi ears soft lad ee by gum tell thi summat for nowt.
</Panel>
<Panel title="Group 3">
Ah’ll gi’ thee a thick ear. Bobbar nay lad. Breadcake soft
southern pansy wacken thi sen up. Be reet where’s tha bin
mardy bum mardy bum. Tell thi summat for nowt where there’s
muck there’s brass shu’ thi gob. Dahn t’coil oil. That’s
champion ey up will ‘e ‘eckerslike shurrup by ‘eck.
</Panel>
</Accordion>
);