Skip to content

Commit

Permalink
fix(): refine table row height
Browse files Browse the repository at this point in the history
  • Loading branch information
weareoutman committed Jan 23, 2025
1 parent 888ffeb commit 0343fc8
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 3 deletions.
3 changes: 3 additions & 0 deletions bricks/advanced/docs/eo-next-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
- brick: eo-button
properties:
type: link
size: small
icon:
lib: antd
icon: edit
Expand All @@ -59,6 +60,7 @@
- brick: eo-button
properties:
type: link
size: small
danger: true
icon:
lib: antd
Expand Down Expand Up @@ -693,6 +695,7 @@ children:
- brick: eo-next-table
properties:
pagination: false
bordered: true
columns:
- dataIndex: name
key: name
Expand Down
14 changes: 11 additions & 3 deletions bricks/advanced/src/next-table/host-context.css
Original file line number Diff line number Diff line change
@@ -1,22 +1,30 @@
:root {
--eo-table-head-cell-padding: 14px 12px;
--eo-table-head-cell-height: 51px;
--eo-table-body-cell-padding: 11px 12px;
--eo-table-body-cell-height: 45px;
}

html[data-ui="v8-2"] {
--eo-table-head-cell-padding: 9px 12px;
--eo-table-head-cell-height: 41px;

eo-next-table[size="large"] {
--eo-table-body-cell-padding: 11px 12px;
--eo-table-body-cell-padding: 9px 12px;
--eo-table-body-cell-height: 45px;
}

eo-next-table[size="middle"] {
--eo-table-head-cell-padding: 7px 12px;
--eo-table-body-cell-padding: 8px 12px;
--eo-table-head-cell-height: 37px;
--eo-table-body-cell-padding: 6px 12px;
--eo-table-body-cell-height: 39px;
}

eo-next-table[size="small"] {
--eo-table-head-cell-padding: 3px 12px;
--eo-table-body-cell-padding: 4px 12px;
--eo-table-head-cell-height: 29px;
--eo-table-body-cell-padding: 1px 12px;
--eo-table-body-cell-height: 31px;
}
}
23 changes: 23 additions & 0 deletions bricks/advanced/src/next-table/styles.shadow.css
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
> th,
.next-table.ant-table-wrapper .ant-table .ant-table-container tfoot > tr > th {
padding: var(--eo-table-head-cell-padding);
height: var(--eo-table-head-cell-height);
}

.next-table.ant-table-wrapper .ant-table .ant-table-container .ant-table-cell,
Expand All @@ -69,6 +70,7 @@
> td,
.next-table.ant-table-wrapper .ant-table .ant-table-container tfoot > tr > td {
padding: var(--eo-table-body-cell-padding);
height: var(--eo-table-body-cell-height);
}

.ant-table-wrapper
Expand Down Expand Up @@ -159,6 +161,15 @@
right: 11px;
}

.next-table.ant-table-wrapper
.ant-table-ping-left
.ant-table-cell-fix-left-first::after,
.next-table.ant-table-wrapper
.ant-table-ping-left
.ant-table-cell-fix-left-last::after {
box-shadow: inset 10px 0 8px -8px rgba(0, 0, 0, 0.15);
}

.next-table.ant-table-wrapper
.ant-table-ping-right
.ant-table-cell-fix-right-first::after,
Expand All @@ -168,6 +179,18 @@
box-shadow: inset -10px 0 8px -8px rgba(0, 0, 0, 0.15);
}

.next-table.ant-table-wrapper
.ant-table-ping-left:not(.ant-table-has-fix-left)
.ant-table-container::before {
box-shadow: inset 10px 0 8px -8px rgba(0, 0, 0, 0.15);
}

.next-table.ant-table-wrapper
.ant-table-ping-right:not(.ant-table-has-fix-right)
.ant-table-container::after {
box-shadow: inset -10px 0 8px -8px rgba(0, 0, 0, 0.15);
}

.next-table.ant-table-wrapper .ant-table-column-sorters {
justify-content: initial;
}
Expand Down

0 comments on commit 0343fc8

Please sign in to comment.