Refactored MuiChip overrides

Signed-off-by: Andre Wanlin <67169551+awanlin@users.noreply.github.com>
This commit is contained in:
Andre Wanlin
2023-07-11 07:12:25 -05:00
parent f8be6ff22f
commit f0444f0943
2 changed files with 5 additions and 6 deletions
+5
View File
@@ -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
@@ -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)}`,