Merge pull request #17246 from Hennnnes/feat/dismissable_banner_button_color
feat: Allow closeButton color in DismissableBanner to be configurable
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@backstage/core-components': patch
|
||||
'@backstage/theme': patch
|
||||
---
|
||||
|
||||
Allow `closeButton` color in `DismissableBanner` to be configurable (via. `theme.palette.banner.closeButtonColor`)
|
||||
@@ -64,15 +64,18 @@ const useStyles = makeStyles(
|
||||
width: '100%',
|
||||
maxWidth: 'inherit',
|
||||
flexWrap: 'nowrap',
|
||||
color: theme.palette.banner.text,
|
||||
},
|
||||
message: {
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
color: theme.palette.banner.text,
|
||||
'& a': {
|
||||
color: theme.palette.banner.link,
|
||||
},
|
||||
},
|
||||
button: {
|
||||
color: theme.palette.banner.closeButtonColor ?? 'inherit',
|
||||
},
|
||||
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} />
|
||||
|
||||
@@ -70,6 +70,7 @@ export type BackstagePaletteAdditions = {
|
||||
error: string;
|
||||
text: string;
|
||||
link: string;
|
||||
closeButtonColor?: string;
|
||||
warning?: string;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -85,6 +85,7 @@ export type BackstagePaletteAdditions = {
|
||||
error: string;
|
||||
text: string;
|
||||
link: string;
|
||||
closeButtonColor?: string;
|
||||
warning?: string;
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user