import React from 'react';
import './index.less';

function Navigation(props) {
  const { list = [], active = 0 } = props;
  return (
    <div className="navigation">
      {list.map((item, index) => {
        return (
          <div className={`item ${index === active ? 'active' : ''}`}>
            <span className="text">{item.title}</span>
          </div>
        );
      })}
    </div>
  );
}
Navigation.propTypes = {};
export default Navigation;
