forked from nsjcy/frontEnd/nsjcy

Mr Ke
2020-03-31 09b4797fb18e2971434c8cfc217f706628e0126e
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
/**
 * 徐祥健<xuxj@hugeinfo.com.cn>
 * 2018年7月17日 16:41
 *
 */
 
 
import React from 'react';
import user from '../../asset/icons/user.svg';
import { Button } from 'antd'
import './style.scss';
 
export default function TableHeadView({ type, name, children, btnName, onClick }) {
  return (
    <React.Fragment>
      {type == "infoManage" ?
        <div className="table-head-view-btn">
          <Button type="primary" size='large' onClick={onClick}>{btnName}</Button>
        </div>
        :
        null
      }
      <div className="table-head-view-main">
        {type == "infoManage" ? <div className="table-head-view-type"><img src={user} style={{ width: '16px', marginRight: '5px' }} />{name}</div> : null
        }
        <div className="table-head-view-count">{children}</div>
      </div>
    </React.Fragment>
  );
 
}