|
@@ -16,6 +16,7 @@ type NotificationProps = {
|
|
|
action?: React.ReactElement
|
|
action?: React.ReactElement
|
|
|
onDismiss?: AlertProps['onDismiss']
|
|
onDismiss?: AlertProps['onDismiss']
|
|
|
className?: string
|
|
className?: string
|
|
|
|
|
+ newNotificationStyle?: boolean
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -35,12 +36,12 @@ function Notification({
|
|
|
className,
|
|
className,
|
|
|
body,
|
|
body,
|
|
|
action,
|
|
action,
|
|
|
|
|
+ newNotificationStyle,
|
|
|
...props
|
|
...props
|
|
|
}: NotificationProps) {
|
|
}: NotificationProps) {
|
|
|
- const newNotificationStyle = getMeta(
|
|
|
|
|
- 'ol-newNotificationStyle',
|
|
|
|
|
- false
|
|
|
|
|
- ) as boolean
|
|
|
|
|
|
|
+ newNotificationStyle =
|
|
|
|
|
+ newNotificationStyle ??
|
|
|
|
|
+ (getMeta('ol-newNotificationStyle', false) as boolean)
|
|
|
|
|
|
|
|
const [show, setShow] = useState(true)
|
|
const [show, setShow] = useState(true)
|
|
|
|
|
|
|
@@ -61,7 +62,7 @@ function Notification({
|
|
|
bsStyle === 'danger' ? 'error' : bsStyle
|
|
bsStyle === 'danger' ? 'error' : bsStyle
|
|
|
) as NotificationType
|
|
) as NotificationType
|
|
|
return (
|
|
return (
|
|
|
- <li>
|
|
|
|
|
|
|
+ <li className={classnames('notification-entry', className)}>
|
|
|
<NewNotification
|
|
<NewNotification
|
|
|
type={newNotificationType}
|
|
type={newNotificationType}
|
|
|
isDismissible={onDismiss != null}
|
|
isDismissible={onDismiss != null}
|