From 0c23674bbda44bd057fc42dd7c1891d3d908c976 Mon Sep 17 00:00:00 2001 From: kaminderpal Date: Thu, 11 Jul 2024 10:36:02 -0400 Subject: [PATCH] fix(geo.ca): fix style issues of geo.ca closes2355 --- .../core/components/data-table/data-table.tsx | 2 +- .../core/components/export/export-modal.tsx | 1 - .../src/ui/select/select-style.ts | 3 --- .../src/ui/style/themeOptionsGenerator.ts | 24 +++++++++++++++++++ .../geoview-time-slider/src/time-slider.tsx | 1 - 5 files changed, 25 insertions(+), 6 deletions(-) diff --git a/packages/geoview-core/src/core/components/data-table/data-table.tsx b/packages/geoview-core/src/core/components/data-table/data-table.tsx index 9d13b5d328c..f6a8ee088d2 100644 --- a/packages/geoview-core/src/core/components/data-table/data-table.tsx +++ b/packages/geoview-core/src/core/components/data-table/data-table.tsx @@ -420,7 +420,7 @@ function DataTable({ data, layerPath, tableHeight = '500px' }: DataTableProps): - + diff --git a/packages/geoview-core/src/core/components/export/export-modal.tsx b/packages/geoview-core/src/core/components/export/export-modal.tsx index 031cd46a65a..b1b0198e6f1 100644 --- a/packages/geoview-core/src/core/components/export/export-modal.tsx +++ b/packages/geoview-core/src/core/components/export/export-modal.tsx @@ -171,7 +171,6 @@ export default function ExportModal(): JSX.Element { sx={{ paddingBottom: '1rem', minWidth: 300, - '& input': { padding: 0, minHeight: '2.5rem' }, '& label + div': { marginTop: '0.5rem' }, }} /> diff --git a/packages/geoview-core/src/ui/select/select-style.ts b/packages/geoview-core/src/ui/select/select-style.ts index 65345ff7f7c..49a99861f91 100644 --- a/packages/geoview-core/src/ui/select/select-style.ts +++ b/packages/geoview-core/src/ui/select/select-style.ts @@ -30,9 +30,6 @@ export const getSxClasses = (theme: Theme): any => ({ '& .MuiSvgIcon-root': { color: theme.palette.text.primary, }, - '& select': { - height: '2.25rem', - }, }, label: { color: theme.palette.text.primary, diff --git a/packages/geoview-core/src/ui/style/themeOptionsGenerator.ts b/packages/geoview-core/src/ui/style/themeOptionsGenerator.ts index cc9be48fae7..d8845be5bb4 100644 --- a/packages/geoview-core/src/ui/style/themeOptionsGenerator.ts +++ b/packages/geoview-core/src/ui/style/themeOptionsGenerator.ts @@ -389,6 +389,30 @@ export const generateThemeOptions = (geoViewColors: IGeoViewColors = defaultGeoV }, }, }, + MuiSelect: { + styleOverrides: { + select: { + minHeight: '2.25rem', + padding: '0 !important', + }, + }, + }, + MuiNativeSelect: { + styleOverrides: { + select: { + minHeight: '2.25rem', + padding: '0 !important', + }, + }, + }, + MuiInputBase: { + styleOverrides: { + input: { + minHeight: '2.5rem', + padding: '0 !important', + }, + }, + }, }, overrides: { button: { diff --git a/packages/geoview-time-slider/src/time-slider.tsx b/packages/geoview-time-slider/src/time-slider.tsx index e58bab47721..733d40dabc1 100644 --- a/packages/geoview-time-slider/src/time-slider.tsx +++ b/packages/geoview-time-slider/src/time-slider.tsx @@ -477,7 +477,6 @@ export function TimeSlider(props: TimeSliderProps): JSX.Element { name: 'timeDelay', onChange: (event) => handleTimeChange(event), }} - sx={{ minHeight: '2rem', padding: 0 }} >