{"size": 804, "ext": "js", "max_stars_repo_path": "src/components/ToolBar/index.js", "max_stars_repo_name": "hfxGitHub/governmentManager", "max_stars_repo_stars_event_min_datetime": "2020-08-07T10:39:57.000Z", "max_stars_repo_stars_event_max_datetime": "2020-08-07T10:39:57.000Z", "max_issues_repo_path": "src/components/ToolBar/index.js", "max_issues_repo_name": "hfxGitHub/governmentManager", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/components/ToolBar/index.js", "max_forks_repo_name": "hfxGitHub/governmentManager", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 22.3333333333, "max_line_length": 59, "alphanum_fraction": 0.4589552239}
import React, { PureComponent } from 'react';
import { Button } from 'antd';
import style from './index.less';

class ToolBar extends PureComponent {
  constructor(props) {
    super(props);
  }

  render() {
    const { BtnList } = this.props;
    return (
      <div className={style.toolbar}>
        {
          BtnList.map((item, index) => {
            return (
              <Button
                style={{ display: item.ishow || 'inline' }}
                icon={item.icon}
                type={item.type || 'default'}
                onClick={item.click}
                key={`toolbar${index}`}
                disabled={item.disabled}
              >
                {item.name}
              </Button>
            );
          })
        }
      </div>
    );
  }
}

export default ToolBar;
