From 43002ad70ff9f0b9530b1e74ec396c078e401ab0 Mon Sep 17 00:00:00 2001 From: ahussein3 Date: Thu, 17 Aug 2023 15:32:02 +0200 Subject: [PATCH 1/3] add new primary color to palette --- ui/lib/theme.ts | 8 ++++++++ ui/typedefs/styled.d.ts | 1 + 2 files changed, 9 insertions(+) diff --git a/ui/lib/theme.ts b/ui/lib/theme.ts index e7da3277c5..2c8fea9270 100644 --- a/ui/lib/theme.ts +++ b/ui/lib/theme.ts @@ -64,6 +64,7 @@ export const theme = (mode: ThemeTypes = ThemeTypes.Light): DefaultTheme => { primaryLight10: "#98E0F7", primary10: "#00b3ec", primary20: "#006B8E", + primary30: "#556991", successLight: "#156034", successMedium: "#78CC9C", successOriginal: "#27AE60", @@ -106,6 +107,7 @@ export const theme = (mode: ThemeTypes = ThemeTypes.Light): DefaultTheme => { primaryLight10: "#98E0F7", primary10: "#009CCC", primary20: "#006B8E", + primary30: "#556991", successLight: "#C9EBD7", successMedium: "#78CC9C", successOriginal: "#27AE60", @@ -292,6 +294,12 @@ export const muiTheme = (colors, mode) => ? `1px solid ${colors.primary20}` : `1px solid ${colors.neutral20}`, }, + "&$outlinedPrimary": { + border: + mode === ThemeTypes.Dark + ? `1px solid ${colors.primary30}` + : `1px solid ${colors.neutral20}`, + }, }, }, //disabled checkboxes in dark mode diff --git a/ui/typedefs/styled.d.ts b/ui/typedefs/styled.d.ts index cb64f925f6..012cc05a4c 100644 --- a/ui/typedefs/styled.d.ts +++ b/ui/typedefs/styled.d.ts @@ -9,6 +9,7 @@ export namespace colors { const primaryLight10: string; const primary10: string; const primary20: string; + const primary30: string; const alertLight: string; const alertOriginal: string; const alertMedium: string; From 06ff245abea7bc307b56b630a43a49a0c175aa9f Mon Sep 17 00:00:00 2001 From: ahussein3 Date: Tue, 22 Aug 2023 11:20:03 +0200 Subject: [PATCH 2/3] update row bottom border color for dark mode --- ui/components/DataTable/DataTable.tsx | 7 +++++++ ui/lib/theme.ts | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ui/components/DataTable/DataTable.tsx b/ui/components/DataTable/DataTable.tsx index d8017a1667..b9eeb9f395 100644 --- a/ui/components/DataTable/DataTable.tsx +++ b/ui/components/DataTable/DataTable.tsx @@ -383,6 +383,13 @@ export const DataTable = styled(UnstyledDataTable)` : props.theme.colors.neutral10}; transition: background 0.5s ease-in-out; } + + .MuiTableCell-root { + border-color: ${(props) => + props.theme.mode === ThemeTypes.Dark + ? props.theme.colors.primary30 + : props.theme.colors.neutral20}; + } table { margin-top: ${(props) => props.theme.spacing.small}; } diff --git a/ui/lib/theme.ts b/ui/lib/theme.ts index 2c8fea9270..39b4fb9b86 100644 --- a/ui/lib/theme.ts +++ b/ui/lib/theme.ts @@ -284,7 +284,7 @@ export const muiTheme = (colors, mode) => root: { "&$disabled": { color: - mode === ThemeTypes.Dark ? colors.primary20 : colors.neutral20, + mode === ThemeTypes.Dark ? colors.primary30 : colors.neutral20, }, }, outlined: { From 92ca11358c2b4044eb38d0e881ee3e70a2abae71 Mon Sep 17 00:00:00 2001 From: ahussein3 Date: Tue, 22 Aug 2023 11:47:15 +0200 Subject: [PATCH 3/3] update Table snapshot --- .../DataTable/__tests__/__snapshots__/DataTable.test.tsx.snap | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ui/components/DataTable/__tests__/__snapshots__/DataTable.test.tsx.snap b/ui/components/DataTable/__tests__/__snapshots__/DataTable.test.tsx.snap index c2e8ac9712..211f22532f 100644 --- a/ui/components/DataTable/__tests__/__snapshots__/DataTable.test.tsx.snap +++ b/ui/components/DataTable/__tests__/__snapshots__/DataTable.test.tsx.snap @@ -291,6 +291,10 @@ exports[`DataTable snapshots renders 1`] = ` transition: background 0.5s ease-in-out; } +.c1 .MuiTableCell-root { + border-color: #d8d8d8; +} + .c1 table { margin-top: 12px; }