Merge pull request #7847 from backstage/timbonicus/non-breaking-dismissable-warning

This commit is contained in:
Himanshu Mishra
2021-11-04 21:31:54 +05:30
committed by GitHub
4 changed files with 7 additions and 4 deletions
+3 -1
View File
@@ -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' },
+1 -1
View File
@@ -64,7 +64,7 @@ export type BackstagePaletteAdditions = {
error: string;
text: string;
link: string;
warning: string;
warning?: string;
};
};
+1 -1
View File
@@ -76,7 +76,7 @@ export type BackstagePaletteAdditions = {
error: string;
text: string;
link: string;
warning: string;
warning?: string;
};
};