feat: allow closeButton color in DismissableBanner to be configurable

Signed-off-by: hennnnes <hroemmer@googlemail.com>
This commit is contained in:
hennnnes
2023-04-11 10:11:56 +02:00
parent 9c7dd379f1
commit 303c2c3ce5
5 changed files with 14 additions and 1 deletions
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/core-components': minor
'@backstage/theme': minor
---
Allow closeButton color in DismissableBanner to be configurable (via. theme.palette.banner.closeButtonColor)
@@ -73,6 +73,9 @@ const useStyles = makeStyles(
color: theme.palette.banner.link,
},
},
button: {
color: theme.palette.banner.closeButtonColor,
},
info: {
backgroundColor: theme.palette.banner.info,
},
@@ -144,7 +147,7 @@ export const DismissableBanner = (props: Props) => {
<IconButton
key="dismiss"
title="Permanently dismiss this message"
color="inherit"
className={classes.button}
onClick={handleClick}
>
<Close className={classes.icon} />
+1
View File
@@ -70,6 +70,7 @@ export type BackstagePaletteAdditions = {
error: string;
text: string;
link: string;
closeButtonColor: string;
warning?: string;
};
};
+2
View File
@@ -55,6 +55,7 @@ export const lightTheme = createTheme({
error: '#E22134',
text: '#FFFFFF',
link: '#000000',
closeButtonColor: '#FFFFFF',
warning: '#FF9800',
},
border: '#E6E6E6',
@@ -136,6 +137,7 @@ export const darkTheme = createTheme({
error: '#E22134',
text: '#FFFFFF',
link: '#000000',
closeButtonColor: '#FFFFFF',
warning: '#FF9800',
},
border: '#E6E6E6',
+1
View File
@@ -85,6 +85,7 @@ export type BackstagePaletteAdditions = {
error: string;
text: string;
link: string;
closeButtonColor: string;
warning?: string;
};
};