@orderly.network/ui-notification
v3.4.1
Published
Downloads
5,413
Readme
@orderly.network/ui-notification
Announcement pages, notification components and hooks for Orderly applications. Supports an announcement center with article details, bell content, popup cards and maintenance reminders. Use with Scaffold or custom layouts inside your existing Orderly app providers.
Main exports
| Export | Purpose |
| ----------------------------------------------- | ------------------------------------------------------------------------- |
| AnnouncementCenterPage | Announcement list and article detail page. |
| AnnouncementCenterUI | Bell content for an announcement summary list. |
| NotificationUI | Presentation component for a notification carousel. |
| AnnouncementProvider | Shares announcement data across custom entry points. |
| useAnnouncement | Announcement summaries, active cards, unread state and dismissal actions. |
| useAnnouncementList / useAnnouncementDetail | Read announcement pages or individual articles within a provider. |
| AnnouncementSummary | Data type for bell and carousel UI. |
Quick start
Inside your existing wallet and locale providers, use your app configuration
(appProps) and host router adapter (routerAdapter):
import { OrderlyAppProvider } from "@orderly.network/react-app";
import { AnnouncementCenterPage } from "@orderly.network/ui-notification";
import { Scaffold } from "@orderly.network/ui-scaffold";
<OrderlyAppProvider {...appProps} onRouteChange={routerAdapter.onRouteChange}>
<Scaffold routerAdapter={routerAdapter}>
<AnnouncementCenterPage />
</Scaffold>
</OrderlyAppProvider>;This renders the announcement list. To render an article, pass the detail route's
slug, for example <AnnouncementCenterPage slug="release-notes" />.
See route and navigation setup
for the host routing requirements.
Key defaults
- Official announcements are included by default (
excludeOfficial=false). SetwidgetConfigs.announcement.excludeOfficialtotrueto exclude them. Platform announcements use the globally configuredbrokerId. - The page uses the global
OrderlyAppProvider.onRouteChange. Its optionalrouterAdaptertakes priority. Scaffold's bell and cards useScaffold.routerAdapter. - Scaffold and the announcement page supply announcement providers automatically.
Custom entry points can share an
AnnouncementProvider. - Ordinary announcements load silently. Maintenance reminders remain available independently of official announcement visibility.
Documentation
- Integration and migration guide: navigation, routes, announcement sources, custom UI migration and deployment requirements.
- SDK Integration and Upgrade Guides: version-specific upgrade paths and migration checklists.
- Public exports: follow each exported declaration for its types, defaults and English JSDoc.
