forked from reactstrap/reactstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgressPage.js
More file actions
118 lines (111 loc) · 3.31 KB
/
Copy pathProgressPage.js
File metadata and controls
118 lines (111 loc) · 3.31 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
111
112
113
114
115
116
117
118
/* eslint react/no-multi-comp: 0, react/prop-types: 0 */
import React from 'react';
import { PrismCode } from 'react-prism';
import Helmet from 'react-helmet';
import { Card, CardText } from 'reactstrap';
import ProgressExample from '../examples/Progress';
const ProgressExampleSource = require('!!raw!../examples/Progress');
import ProgressColorExample from '../examples/ProgressColor';
const ProgressColorExampleSource = require('!!raw!../examples/ProgressColor');
import ProgressAnimatedExample from '../examples/ProgressAnimated';
const ProgressAnimatedExampleSource = require('!!raw!../examples/ProgressAnimated');
import ProgressStripedExample from '../examples/ProgressStriped';
const ProgressStripedExampleSource = require('!!raw!../examples/ProgressStriped');
import ProgressMaxExample from '../examples/ProgressMax';
const ProgressMaxExampleSource = require('!!raw!../examples/ProgressMax');
export default class ProgressPage extends React.Component {
render() {
return (
<div>
<Helmet title="Progress" />
<h3>Progress</h3>
<div className="docs-example">
<ProgressExample />
</div>
<pre>
<PrismCode className="language-jsx">
{ProgressExampleSource}
</PrismCode>
</pre>
<h4>Properties</h4>
<pre>
<PrismCode className="language-jsx">
{`Progress.propTypes = {
tag: PropTypes.string,
value: PropTypes.oneOfType([
PropTypes.string,
PropTypes.number,
]),
max: PropTypes.oneOf([
PropTypes.string,
PropTypes.number,
]),
animated: PropTypes.bool,
stripped: PropTypes.bool,
color: PropTypes.string,
className: PropTypes.string
};
Progress.defaultProps = {
tag: 'progress',
value: 0,
max: 100,
};`}
</PrismCode>
</pre>
<h3>Color Variants</h3>
<div className="docs-example">
<div>
<ProgressColorExample />
</div>
</div>
<pre>
<PrismCode className="language-jsx">
{ProgressColorExampleSource}
</PrismCode>
</pre>
<h3>Striped</h3>
<div className="docs-example">
<div>
<ProgressStripedExample />
</div>
</div>
<pre>
<PrismCode className="language-jsx">
{ProgressStripedExampleSource}
</PrismCode>
</pre>
<h3>Animated</h3>
<p>
The <code>animated</code> prop also adds the <code>striped</code> prop; there is no need to pass both.
</p>
<Card block outline color="danger">
<CardText>
Currently, animated progress does not work in bootstrap v4 (alpha 3). This is an issue bootstrap has to
resolve.
</CardText>
</Card>
<div className="docs-example">
<div>
<ProgressAnimatedExample />
</div>
</div>
<pre>
<PrismCode className="language-jsx">
{ProgressAnimatedExampleSource}
</PrismCode>
</pre>
<h3>Max value</h3>
<div className="docs-example">
<div>
<ProgressMaxExample />
</div>
</div>
<pre>
<PrismCode className="language-jsx">
{ProgressMaxExampleSource}
</PrismCode>
</pre>
</div>
);
}
}