2018-01-30 11:53:12 -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 11:53:12 -05:00
|
|
|
const StepNavigation = props => (
|
|
|
|
<ul className={classNames('step-navigation', props.className)}>
|
|
|
|
{Array.apply(null, Array(props.steps)).map((v, step) => (
|
|
|
|
<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;
|