I'm creating a basic small Table
in chakra-ui
, however the whitespace between columns is too much for my particular use case. I've set size="sm"
but it's still too much whitespace.
How can we achieve this? Here's a summary snippet of pseudo-code corresponding to my problem:
<Table size="sm">
<Thead>
// ...
</Thead>
<Tbody>
//...
</Tbody>
</Table>
Here's the full worked example in codesandbox: =/src/ResponsiveTable.tsx:196-344
I'm creating a basic small Table
in chakra-ui
, however the whitespace between columns is too much for my particular use case. I've set size="sm"
but it's still too much whitespace.
How can we achieve this? Here's a summary snippet of pseudo-code corresponding to my problem:
<Table size="sm">
<Thead>
// ...
</Thead>
<Tbody>
//...
</Tbody>
</Table>
Here's the full worked example in codesandbox: https://codesandbox.io/s/responsive-table-forked-ut904?file=/src/ResponsiveTable.tsx:196-344
Share Improve this question asked Jul 24, 2021 at 3:54 ABCABC 7831 gold badge12 silver badges28 bronze badges1 Answer
Reset to default 5You just to add css to override css of Table:
<Table size="small" className="table-tiny" />
and in css:
.table-tiny th,
.table-tiny td {
padding-left: 4px;
padding-right: 4px;
}
https://codesandbox.io/s/responsive-table-forked-8683s?file=/src/ResponsiveTable.tsx
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744866620a4598014.html
评论列表(0条)