mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-30 10:58:23 -05:00
590f505a61
This reverts commit1b1b396e92
, reversing changes made toa144bab0e6
.
29 lines
784 B
JavaScript
29 lines
784 B
JavaScript
const classNames = require('classnames');
|
|
const PropTypes = require('prop-types');
|
|
const React = require('react');
|
|
|
|
require('./stepnavigation.scss');
|
|
|
|
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
|
|
};
|
|
|
|
module.exports = StepNavigation;
|