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:
Jimmy Domagala-Tang
2023-12-04 09:02:58 +00:00
committed by Copybot
parent 8e194d5ff9
commit 31fcd01e3a
3 changed files with 76 additions and 1 deletions
@@ -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 = () => {