2018-01-30 10:33:15 -05:00
|
|
|
const classNames = require('classnames');
|
|
|
|
const PropTypes = require('prop-types');
|
|
|
|
const React = require('react');
|
2016-03-29 10:07:23 -04:00
|
|
|
|
2016-06-16 10:54:36 -04:00
|
|
|
require('./stepnavigation.scss');
|
|
|
|
|
2018-01-30 10:33:15 -05:00
|
|
|
const StepNavigation = props => (
|
|
|
|
<ul className={classNames('step-navigation', props.className)}>
|
2021-02-11 20:02:08 -05:00
|
|
|
{Array(...Array(props.steps)).map((v, step) => (
|
2018-01-30 10:33:15 -05:00
|
|
|
<li
|
|
|
|
className={classNames({
|
|
|
|
active: step < props.active,
|
|
|
|
selected: step === props.active
|
|
|
|
})}
|
|
|
|
key={step}
|
|
|
|
>
|
|
|
|
<div className="indicator" />
|
|
|
|
</li>
|
|
|
|
))}
|
|
|
|
</ul>
|
|
|
|
);
|
|
|
|
|
|
|
|
StepNavigation.propTypes = {
|
|
|
|
active: PropTypes.number,
|
|
|
|
className: PropTypes.string,
|
|
|
|
steps: PropTypes.number
|
|
|
|
};
|
2016-06-16 10:54:36 -04:00
|
|
|
|
|
|
|
module.exports = StepNavigation;
|