scratch-www/src/components/stepnavigation/stepnavigation.jsx

29 lines
908 B
React
Raw Normal View History

2018-01-30 09:53:25 -05:00
var classNames = require('classnames');
var 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 09:53:25 -05:00
var StepNavigation = React.createClass({
type: 'Navigation',
render: function () {
return (
<ul className={classNames('step-navigation', this.props.className)}>
{Array.apply(null, Array(this.props.steps)).map(function (v, step) {
return (
<li key={step}
className={classNames({
active: step < this.props.active,
selected: step === this.props.active
})}
>
<div className="indicator" />
</li>
);
}.bind(this))}
</ul>
);
}
});
2016-06-16 10:54:36 -04:00
module.exports = StepNavigation;