forked from reactstrap/reactstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathButtonsPage.js
More file actions
110 lines (106 loc) · 3.75 KB
/
Copy pathButtonsPage.js
File metadata and controls
110 lines (106 loc) · 3.75 KB
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
/* eslint react/no-multi-comp: 0, react/prop-types: 0 */
import React from 'react';
import { PrismCode } from 'react-prism';
import { Button } from 'reactstrap';
import Helmet from 'react-helmet';
import ButtonExample from '../examples/Button';
const ButtonExampleSource = require('!!raw!../examples/Button');
import ButtonOutline from '../examples/ButtonOutline';
const ButtonOutlineSource = require('!!raw!../examples/ButtonOutline');
export default class ButtonsPage extends React.Component {
render() {
return (
<div>
<Helmet title="Buttons" />
<h3>Buttons</h3>
<div className="docs-example">
<ButtonExample />
</div>
<pre>
<PrismCode className="language-jsx">
{ButtonExampleSource}
</PrismCode>
</pre>
<h4>Properties</h4>
<pre>
<PrismCode className="language-jsx">
{`Button.propTypes = {
active: PropTypes.bool,
block: PropTypes.bool,
color: PropTypes.string, // default: 'secondary'
disabled: PropTypes.bool,
// Pass in a Component to override default button element
// example: react-router Link
// default: 'button'
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
onClick: PropTypes.func,
size: PropTypes.string
}`}
</PrismCode>
</pre>
<h3>Outline Buttons</h3>
<div className="docs-example">
<ButtonOutline />
</div>
<pre>
<PrismCode className="language-jsx">
{ButtonOutlineSource}
</PrismCode>
</pre>
<h3>Sizes</h3>
<div className="docs-example">
<Button color="primary" size="lg">Large Button</Button>{' '}
<Button color="secondary" size="lg">Large Button</Button>
</div>
<pre>
<PrismCode className="language-jsx">
{`<Button color="primary" size="lg">Large Button</Button>{' '}
<Button color="secondary" size="lg">Large Button</Button>`}
</PrismCode>
</pre>
<div className="docs-example">
<Button color="primary" size="sm">Small Button</Button>{' '}
<Button color="secondary" size="sm">Small Button</Button>
</div>
<pre>
<PrismCode className="language-jsx">
{`<Button color="primary" size="sm">Small Button</Button>{' '}
<Button color="secondary" size="sm">Small Button</Button>`}
</PrismCode>
</pre>
<div className="docs-example">
<Button color="primary" size="lg" block>Block level button</Button>
<Button color="secondary" size="lg" block>Block level button</Button>
</div>
<pre>
<PrismCode className="language-jsx">
{`<Button color="primary" size="lg" block>Block level button</Button>
<Button color="secondary" size="lg" block>Block level button</Button>`}
</PrismCode>
</pre>
<h3>Active State</h3>
<div className="docs-example">
<Button color="primary" size="lg" active>Primary link</Button>{' '}
<Button color="secondary" size="lg" active>Link</Button>
</div>
<pre>
<PrismCode className="language-jsx">
{`<Button color="primary" size="lg" active>Primary link</Button>{' '}
<Button color="secondary" size="lg" active>Link</Button>`}
</PrismCode>
</pre>
<h3>Disabled State</h3>
<div className="docs-example">
<Button color="primary" size="lg" disabled>Primary button</Button>{' '}
<Button color="secondary" size="lg" disabled>Button</Button>
</div>
<pre>
<PrismCode className="language-jsx">
{`<Button color="primary" size="lg" disabled>Primary button</Button>{' '}
<Button color="secondary" size="lg" disabled>Button</Button>`}
</PrismCode>
</pre>
</div>
);
}
}