Merge pull request #7847 from backstage/timbonicus/non-breaking-dismissable-warning
This commit is contained in:
@@ -3,4 +3,6 @@
|
||||
'@backstage/theme': patch
|
||||
---
|
||||
|
||||
Will Add warning variant to `DismissableBanner` component.
|
||||
Added a warning variant to `DismissableBanner` component. If you are using a
|
||||
custom theme, you will need to add the optional `palette.banner.warning` color,
|
||||
otherwise this variant will fall back to the `palette.banner.error` color.
|
||||
|
||||
@@ -80,7 +80,8 @@ const useStyles = makeStyles(
|
||||
backgroundColor: theme.palette.banner.error,
|
||||
},
|
||||
warning: {
|
||||
backgroundColor: theme.palette.banner.warning,
|
||||
backgroundColor:
|
||||
theme.palette.banner.warning ?? theme.palette.banner.error,
|
||||
},
|
||||
}),
|
||||
{ name: 'BackstageDismissableBanner' },
|
||||
|
||||
@@ -64,7 +64,7 @@ export type BackstagePaletteAdditions = {
|
||||
error: string;
|
||||
text: string;
|
||||
link: string;
|
||||
warning: string;
|
||||
warning?: string;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ export type BackstagePaletteAdditions = {
|
||||
error: string;
|
||||
text: string;
|
||||
link: string;
|
||||
warning: string;
|
||||
warning?: string;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user