Merge pull request #16039 from overleaf/jdt-notification-class-prop
Adding classname to notifications and overlay css utility GitOrigin-RevId: 068672352efe2c93ca830d1dae0209cd02688226
This commit is contained in:
committed by
Copybot
parent
8e194d5ff9
commit
31fcd01e3a
@@ -8,6 +8,7 @@ type NotificationType = 'info' | 'success' | 'warning' | 'error'
|
||||
type NotificationProps = {
|
||||
action?: React.ReactElement
|
||||
ariaLive?: 'polite' | 'off' | 'assertive'
|
||||
className?: string
|
||||
content: React.ReactElement | string
|
||||
customIcon?: React.ReactElement
|
||||
isDismissible?: boolean
|
||||
@@ -42,6 +43,7 @@ function NotificationIcon({
|
||||
function Notification({
|
||||
action,
|
||||
ariaLive,
|
||||
className = '',
|
||||
content,
|
||||
customIcon,
|
||||
isActionBelowContent,
|
||||
@@ -57,7 +59,8 @@ function Notification({
|
||||
const notificationClassName = classNames(
|
||||
'notification',
|
||||
`notification-type-${type}`,
|
||||
isActionBelowContent ? 'notification-cta-below-content' : ''
|
||||
isActionBelowContent ? 'notification-cta-below-content' : '',
|
||||
className
|
||||
)
|
||||
|
||||
const handleDismiss = () => {
|
||||
|
||||
Reference in New Issue
Block a user