12345678910111213141516171819 |
- import React from 'react';
- import './index.less';
- function Step(props) {
- const { list = [], step = 1 } = props;
- return (
- <div className="step">
- {list.map((item, index) => {
- return (
- <div className={`item ${index === step - 1 ? 'active' : ''} ${step - 1 > index ? 'over' : ''}`}>
- <span className="text">{item}</span>
- </div>
- );
- })}
- </div>
- );
- }
- Step.propTypes = {};
- export default Step;
|