From f0444f09439686365abbf83e7995089aefc42a72 Mon Sep 17 00:00:00 2001 From: Andre Wanlin <67169551+awanlin@users.noreply.github.com> Date: Tue, 11 Jul 2023 07:12:25 -0500 Subject: [PATCH] Refactored MuiChip overrides Signed-off-by: Andre Wanlin <67169551+awanlin@users.noreply.github.com> --- .changeset/smooth-badgers-sell.md | 5 +++++ packages/theme/src/v5/defaultComponentThemes.ts | 6 ------ 2 files changed, 5 insertions(+), 6 deletions(-) create mode 100644 .changeset/smooth-badgers-sell.md diff --git a/.changeset/smooth-badgers-sell.md b/.changeset/smooth-badgers-sell.md new file mode 100644 index 0000000000..dacbefb676 --- /dev/null +++ b/.changeset/smooth-badgers-sell.md @@ -0,0 +1,5 @@ +--- +'@backstage/theme': patch +--- + +Removed the hard coded color and background color in the `MuiChip` overrides so that they work better with custom themes diff --git a/packages/theme/src/v5/defaultComponentThemes.ts b/packages/theme/src/v5/defaultComponentThemes.ts index e312ef9017..7c4f0dfd63 100644 --- a/packages/theme/src/v5/defaultComponentThemes.ts +++ b/packages/theme/src/v5/defaultComponentThemes.ts @@ -168,14 +168,9 @@ export const defaultComponentThemes: ThemeOptions['components'] = { MuiChip: { styleOverrides: { root: ({ theme }) => ({ - backgroundColor: '#D9D9D9', // By default there's no margin, but it's usually wanted, so we add some trailing margin marginRight: theme.spacing(1), marginBottom: theme.spacing(1), - color: theme.palette.grey[900], - }), - outlined: ({ theme }) => ({ - color: theme.palette.text.primary, }), label: ({ theme }) => ({ lineHeight: theme.spacing(2.5), @@ -186,7 +181,6 @@ export const defaultComponentThemes: ThemeOptions['components'] = { fontSize: theme.spacing(1.5), }), deleteIcon: ({ theme }) => ({ - color: theme.palette.grey[500], width: theme.spacing(3), height: theme.spacing(3), margin: `0 ${theme.spacing(0.75)} 0 -${theme.spacing(0.75)}`,