30
app/components/Progress/Progress.js
Executable file
30
app/components/Progress/Progress.js
Executable file
@@ -0,0 +1,30 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import classNames from 'classnames';
|
||||
|
||||
import {
|
||||
Progress as BsProgress
|
||||
} from 'reactstrap';
|
||||
|
||||
import classes from './Progress.scss';
|
||||
|
||||
const Progress = (props) => {
|
||||
const { children, slim, className, ...otherProps } = props;
|
||||
const progressClass = classNames(className, {
|
||||
[classes['slim']]: slim
|
||||
});
|
||||
|
||||
return (
|
||||
<BsProgress className={ progressClass } { ...otherProps }>
|
||||
{ !slim && children }
|
||||
</BsProgress>
|
||||
);
|
||||
};
|
||||
|
||||
Progress.propTypes = {
|
||||
slim: PropTypes.bool,
|
||||
className: PropTypes.string,
|
||||
children: PropTypes.node
|
||||
};
|
||||
|
||||
export { Progress };
|
3
app/components/Progress/Progress.scss
Executable file
3
app/components/Progress/Progress.scss
Executable file
@@ -0,0 +1,3 @@
|
||||
.slim {
|
||||
height: 0.3rem;
|
||||
}
|
3
app/components/Progress/index.js
Executable file
3
app/components/Progress/index.js
Executable file
@@ -0,0 +1,3 @@
|
||||
import { Progress } from './Progress';
|
||||
|
||||
export default Progress;
|
Reference in New Issue
Block a user