/* 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 ProgressLabelsExample from '../examples/ProgressLabels'; const ProgressLabelsExampleSource = require('!!raw!../examples/ProgressLabels'); import ProgressAnimatedExample from '../examples/ProgressAnimated'; const ProgressAnimatedExampleSource = require('!!raw!../examples/ProgressAnimated'); import ProgressStripedExample from '../examples/ProgressStriped'; const ProgressStripedExampleSource = require('!!raw!../examples/ProgressStriped'); import ProgressMultiExample from '../examples/ProgressMulti'; const ProgressMultiExampleSource = require('!!raw!../examples/ProgressMulti'); import ProgressMaxExample from '../examples/ProgressMax'; const ProgressMaxExampleSource = require('!!raw!../examples/ProgressMax'); export default class ProgressPage extends React.Component { render() { return (
{ProgressExampleSource}
{`Progress.propTypes = {
multi: PropTypes.bool,
bar: PropTypes.bool, // used in combination with multi
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,
barClassName: PropTypes.string // used to add class to the inner progress-bar element
};
Progress.defaultProps = {
tag: 'progress',
value: 0,
max: 100,
};`}
{ProgressColorExampleSource}
{ProgressLabelsExampleSource}
{ProgressStripedExampleSource}
The animated prop also adds the striped prop; there is no need to pass both.
{ProgressAnimatedExampleSource}
{ProgressMultiExampleSource}
{ProgressMaxExampleSource}