File size: 980 Bytes
181e22f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import styles from './Steps.cm.styl';
class Steps extends Component {
constructor(props) {
super(props);
}
render() {
// const {
// steps,
// } = this.pros;
return (
<div className={styles.steps}>
{this.props.children}
</div>
);
}
}
class Step extends Component {
constructor(props) {
super(props);
}
render() {
const {
title,
index,
active,
} = this.props;
return (
<span className={classnames(styles.step, active && styles.active)}>
<span className={classnames(styles.indexWrapper, active && styles.active)}>
<span className={styles.index}>
{index}
</span>
</span>
<span className={styles.title}>
{title}
</span>
</span>
);
}
}
Steps.Step = Step;
export default Steps;
|