Notification Center
Notifications in the header and on their own page, driven by props and callbacks (no server state).
Overview
- `NotificationMenu`: the bell — an icon
GlanceTriggerwhoseGlanceIndicatorshows the unread count (also in the button's name). It opens a panel with the recent items, "Mark all as read" (onMarkAllAsRead), loading and empty states and a "View all" link (viewAllHref). - `NotificationList`: every notification as cards with a read/unread
Badge, for a page paired withPagination. - `NotificationItem`: an unread dot (or an
icon), the title — a link when it hashref, callingonOpen— the message, the date (formatted in theI18nProviderlocale) and icon buttons foronMarkAsReadandonDelete, described by the title.
Urgent notifications are a ConfirmDialog opened with useDialogPromise.
Built-in text is in English; override it with i18n.labels.
Installation
CLI
Manual
- 1
Register the @fma-ds namespace in components.json (once)
- 2
Add the item
Files land in
components/fma-ds/notification-center/notification-center.tsx; npm and registry dependencies are installed along with them.
Dependencies
- npm
- cn@^0.5.0lucide-react@^1.61.0react-aria-components@^1.22.1