Files
overleaf-cep/services/web/app/views/_mixins/notification.pug
T
Antoine Clausse e0f8aca331 Merge pull request #30613 from overleaf/revert-30251-ac-dismiss-ciam-notification
[web] Revert "Make CIAM login notification dismissible (with cookies)"

GitOrigin-RevId: d7b7fac350dbc5479487341800320d4917f27d1b
2026-01-09 09:07:31 +00:00

39 lines
1.2 KiB
Plaintext

//- to be kept in sync with frontend/js/shared/components/notification.tsx
include ./material_symbol
mixin notificationIcon(type)
if type === 'info'
+material-symbol('info')
else if type === 'success'
+material-symbol('check_circle')
else if type === 'error'
+material-symbol('error')
else if type === 'warning'
+material-symbol('warning')
mixin notification(options)
- var {ariaLive, id, type, title, content, disclaimer, className} = options
- var classNames = `notification notification-type-${type} ${className ? className : ''} ${isActionBelowContent ? 'notification-cta-below-content' : ''}`
div(aria-live=ariaLive role='alert' id=id class=classNames)
.notification-icon
+notificationIcon(type)
.notification-content-and-cta
.notification-content
if title
p
b #{title}
| !{content}
block
//- TODO: handle action
//- if action
//- .notification-cta
if disclaimer
.notification-disclaimer #{disclaimer}
//- TODO: handle dismissible notifications
//- TODO: handle onDismiss
//- if isDismissible
//- .notification-close-btn
//- button(aria-label=translate('close'))
//- +material-symbol("close")