Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the fontSize in an Antd table

I tried to change the fontSize, but it did not take effect:

<Table
  style={{overflow: 'hidden', width: '100%', fontSize: '10px'}}
  dataSource={data.dataSource}
  columns={columns}
  size='small'
  bordered
  pagination={false}
/>

Also my table doesn't fit in the block. Only 3 columns are displayed and the rest disappear. How can this be resolved?

like image 960
Утка Обычная Avatar asked Sep 20 '25 00:09

Утка Обычная


1 Answers

  • your-stylesheet.scss:

    .ant-table table { font-size: 10px; }

like image 160
Trien Tran Avatar answered Sep 22 '25 13:09

Trien Tran