Skip to content

Commit b5378f2

Browse files
committed
chore(ui): add padding to table's th and td
1 parent e18705b commit b5378f2

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

packages/ui/src/components/table/demos/6.Expand.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export default function Demo() {
6767
</tr>
6868
{expand.has(data.name) && (
6969
<tr>
70-
<DTable.Td colSpan={5}>Some extra content...</DTable.Td>
70+
<td colSpan={5}>Some extra content...</td>
7171
</tr>
7272
)}
7373
</React.Fragment>

packages/ui/src/components/table/demos/7.Nested.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,9 @@ export default function Demo() {
8888
</tr>
8989
{expand.has(data.name) && (
9090
<tr>
91-
<DTable.Td
92-
style={{ padding: '0 0 0 60px', backgroundColor: 'var(--rd-background-color-light-gray)' }}
93-
colSpan={5}
94-
dNowrap
95-
>
91+
<td style={{ padding: '0 0 0 60px', backgroundColor: 'var(--rd-background-color-light-gray)' }} colSpan={5}>
9692
{nestedTable}
97-
</DTable.Td>
93+
</td>
9894
</tr>
9995
)}
10096
</React.Fragment>

packages/ui/src/styles/components/table.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@ $table-filter-option-height: 32px;
2727
}
2828

2929
th {
30+
padding: var(--#{$rd-prefix}table-padding-size);
3031
font-weight: 500;
3132
background-color: var(--#{$rd-prefix}background-color-light-gray);
3233
}
3334

3435
td {
36+
padding: var(--#{$rd-prefix}table-padding-size);
3537
background-color: var(--#{$rd-prefix}background-color);
3638
border-bottom: 1px solid var(--#{$rd-prefix}table-border-color);
3739
}
@@ -84,7 +86,6 @@ $table-filter-option-height: 32px;
8486

8587
@include e(cell) {
8688
position: relative;
87-
padding: var(--#{$rd-prefix}table-padding-size);
8889

8990
@include m(fixed-left) {
9091
&::before {

0 commit comments

Comments
 (0)