add warning to dismissableBanner

Signed-off-by: Samira Mokaram <samiram@spotify.com>
This commit is contained in:
Samira Mokaram
2021-10-29 16:47:02 +02:00
parent 142e0458e6
commit f1903c7167
4 changed files with 17 additions and 1 deletions
@@ -105,3 +105,14 @@ export const Fixed = () => (
</ApiProvider>
</div>
);
export const Warning = () => (
<div style={containerStyle}>
<ApiProvider apis={apis}>
<DismissableBanner
message="This is a dismissable banner with a warning message"
variant="warning"
id="warning_dismissable"
/>
</ApiProvider>
</div>
);
@@ -79,12 +79,15 @@ const useStyles = makeStyles(
error: {
backgroundColor: theme.palette.banner.error,
},
warning: {
backgroundColor: theme.palette.banner.warning,
},
}),
{ name: 'BackstageDismissableBanner' },
);
type Props = {
variant: 'info' | 'error';
variant: 'info' | 'error' | 'warning';
message: ReactNode;
id: string;
fixed?: boolean;
+1
View File
@@ -55,6 +55,7 @@ export const lightTheme = createTheme({
error: '#E22134',
text: '#FFFFFF',
link: '#000000',
warning: '#FF9800',
},
border: '#E6E6E6',
textContrast: '#000000',
+1
View File
@@ -76,6 +76,7 @@ export type BackstagePaletteAdditions = {
error: string;
text: string;
link: string;
warning: string;
};
};