Skip to content

Commit

Permalink
fix: Fix multi themes 2 (#407)
Browse files Browse the repository at this point in the history
* Allow multiple themes

* Fix cell selection style
  • Loading branch information
matttdawson authored Aug 31, 2023
1 parent cca2605 commit 479b609
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
1 change: 1 addition & 0 deletions src/components/Grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,7 @@ export const Grid = ({
className={clsx(
"Grid-container",
theme,
"theme-specific",
staleGrid && "Grid-sortIsStale",
gridReady && params.rowData && autoSized && "Grid-ready",
)}
Expand Down
14 changes: 4 additions & 10 deletions src/styles/GridTheme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ $grid-base-font-size: calc(#{lui.$base-font-size} - 1px);
@include ag.grid-styles(
(
themes: (
step-compact: (
'step-compact.theme-specific': (
extend-theme: alpine,
--ag-row-height: 36px,
--ag-header-height: 36px,
--ag-font-size: calc($grid-base-font-size - 2px),
),
step-default: (
'step-default.theme-specific': (
extend-theme: alpine,
--ag-row-height: 40px,
--ag-header-height: 40px,
Expand Down Expand Up @@ -47,8 +47,8 @@ $grid-base-font-size: calc(#{lui.$base-font-size} - 1px);
)
);

.ag-theme-step-default,
.ag-theme-step-compact {
.ag-theme-step-default.theme-specific,
.ag-theme-step-compact.theme-specific {
.ag-cell[col-id="selection"] {
display: flex; // Fix that when you click below checkbox it doesn't process a click
}
Expand Down Expand Up @@ -91,13 +91,7 @@ $grid-base-font-size: calc(#{lui.$base-font-size} - 1px);
padding-right: 15px;
}

.ag-cell[role="gridcell"] {
border-right: none;
border-left: 1px var(--ag-cell-horizontal-border);
}

.ag-cell[aria-colindex="1"] {
border-left: 1px solid transparent;
padding-left: lui.$unit-rg;
}

Expand Down

0 comments on commit 479b609

Please sign in to comment.