From 4c4dc57e8da57fb114f695098d128ea4a651e850 Mon Sep 17 00:00:00 2001 From: Cee Chen Date: Wed, 4 Oct 2023 16:25:29 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20more=20cleanup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - move flex CSS specific to default height cells to its selector, vs. the baseline actions component --- .../datagrid/_data_grid_data_row.scss | 24 ++++++++++--------- .../body/data_grid_cell_actions.test.tsx | 4 ++-- .../datagrid/body/data_grid_cell_actions.tsx | 1 - 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/components/datagrid/_data_grid_data_row.scss b/src/components/datagrid/_data_grid_data_row.scss index 55d948355ee1..5a6869fe66c4 100644 --- a/src/components/datagrid/_data_grid_data_row.scss +++ b/src/components/datagrid/_data_grid_data_row.scss @@ -112,6 +112,10 @@ flex-grow: 1; } + .euiDataGridRowCell__actions { + flex-grow: 0; + } + .euiDataGridRowCell--controlColumn & { height: 100%; align-items: center; @@ -130,16 +134,14 @@ // Cell actions .euiDataGridRowCell__actions { display: flex; -} -.euiDataGridRowCell__actions--flex { - flex-grow: 0; -} -.euiDataGridRowCell__actions--overlay { - position: absolute; - right: 0; - top: 0; - padding: $euiDataGridCellPaddingM 0; - background-color: $euiColorEmptyShade; + + &--overlay { + position: absolute; + right: 0; + top: 0; + padding: $euiDataGridCellPaddingM 0; + background-color: $euiColorEmptyShade; + } } .euiDataGridRowCell__actionButtonIcon { @@ -221,7 +223,7 @@ padding: ($euiDataGridCellPaddingS / 2) 0; } - .euiDataGridRowCell__actions--flex { + .euiDataGridRowCell__defaultHeight .euiDataGridRowCell__actions { transform: translateY(1px); } } diff --git a/src/components/datagrid/body/data_grid_cell_actions.test.tsx b/src/components/datagrid/body/data_grid_cell_actions.test.tsx index 3b2a11b026bc..151f30038145 100644 --- a/src/components/datagrid/body/data_grid_cell_actions.test.tsx +++ b/src/components/datagrid/body/data_grid_cell_actions.test.tsx @@ -33,7 +33,7 @@ describe('EuiDataGridCellActions', () => { expect(component).toMatchInlineSnapshot(`
{ expect(component).toMatchInlineSnapshot(`