import { ConfigProvider, Table } from 'antd';
import { TableProps } from 'antd/lib';
import { TableConfig } from 'antd/lib/config-provider/context';
import styles from './index.less';
const CommonTable = (props: TableConfig & TableProps) => {
  return (
    <div className={styles.container}>
      <ConfigProvider
        // theme={{
        //   components: {
        //     Table: {
        //       headerBg: '#103c62',
        //       borderColor: '#103c62',
        //       headerSplitColor: '#103c62',
            
        //     },
        //   },
        // }}
        theme={{
          components: {
            Table: {
              headerBg: 'transparent', //表头背景
              colorBgContainer: 'transparent',
              headerColor: '#6A738E',
              rowHoverBg: 'rgba(57, 122, 183, 0.2)', //移入背景
              borderColor: 'rgba(57, 122, 183, 0.2)', //边框颜色
              headerSplitColor: 'rgba(57, 122, 183, 0.2)', //分割线颜色
              cellFontSize: 16,
              cellFontSizeSM: 16,
              headerBorderRadius: 20,
            },
          },
        }}
      >
        <Table
          bordered={false}
          className={styles.tablewrap}
          rowClassName={styles.tablerow}
          {...props}
        ></Table>
      </ConfigProvider>
    </div>
  );
};

export default CommonTable;
