15
15
*/
16
16
17
17
import React from 'react' ;
18
- import Alert from '@mui/material/Alert' ;
18
+
19
19
import { MarkdownContent } from '@backstage/core-components' ;
20
20
21
- // export type NotificationBannerColor = 'success' | 'info' | 'warning' | 'error ';
22
- // export type NotificationBannerIcon = 'success' | 'info' | 'warning' | 'error';
23
- // export type NotificationBannerVariant = 'standard' | 'filled' | 'outlined ';
21
+ import Alert from '@mui/material/Alert ';
22
+
23
+ import { HeaderIcon } from './HeaderIcon/HeaderIcon ';
24
24
25
25
/**
26
26
* @public
@@ -34,15 +34,12 @@ export interface NotificationBannerProps {
34
34
id ?: string ;
35
35
title : string ;
36
36
markdown ?: boolean ;
37
+ icon ?: string ;
37
38
38
39
textColor ?: string ;
39
40
backgroundColor ?: string ;
40
- border ?: string ;
41
- borderRadius ?: string ;
42
-
43
- // color?: NotificationBannerColor;
44
- // icon?: NotificationBannerIcon;
45
- // variant?: NotificationBannerVariant;
41
+ borderColor ?: string ;
42
+ layout ?: React . CSSProperties ;
46
43
47
44
dismiss ?: NotificationBannerDismiss ;
48
45
}
@@ -99,18 +96,19 @@ export const NotificationBanner = (props: NotificationBannerProps) => {
99
96
100
97
return (
101
98
< Alert
102
- // color={props.color}
103
- // severity={props.icon}
104
- icon = { false }
105
- // variant={props.variant}
99
+ color = "warning"
100
+ icon = { props . icon ? < HeaderIcon icon = { props . icon } /> : false }
106
101
onClose = { onClose }
107
102
sx = { {
108
- color : props . textColor ?? 'text.primary' ,
109
- backgroundColor : props . backgroundColor ?? 'background.paper' ,
110
- border : props . border ,
111
- borderRadius : props . borderRadius ,
103
+ color : props . textColor ,
104
+ backgroundColor : props . backgroundColor ,
105
+ borderColor : props . borderColor ,
106
+ borderStyle : 'solid' ,
107
+ borderWidth : 2 ,
108
+ borderRadius : 0 ,
112
109
justifyContent : 'center' ,
113
110
textAlign : 'center' ,
111
+ ...props . layout ,
114
112
} }
115
113
>
116
114
{ props . markdown ? (
0 commit comments