Skip to content

pivotick v3.0.0


pivotick / Notifier

Interface: Notifier ​

Defined in: ui/Notifier.ts:197

Manages and displays notification messages in the graph UI.

Use this component to show success, warning, error, or info messages to the user.

Examples ​

ts
graph.notifier.warning('This is a warning', 'Content of the message goes here.')

A notification can also carry one action and outlive the default four seconds, which is how an outcome offers to undo itself:

ts
const toast = graph.notifier.success('Ingested 12 nodes', undefined, {
    action: { label: 'Undo', onClick: (t) => { undo(); t.update({ title: 'Undone' }) } },
})

Methods ​

error() ​

error(title, message?, options?): NotificationHandle | undefined

Defined in: ui/Notifier.ts:234

Parameters ​

title ​

string

message? ​

string

options? ​

Pick<Notification, "action" | "duration">

Returns ​

NotificationHandle | undefined


info() ​

info(title, message?, options?): NotificationHandle | undefined

Defined in: ui/Notifier.ts:238

Parameters ​

title ​

string

message? ​

string

options? ​

Pick<Notification, "action" | "duration">

Returns ​

NotificationHandle | undefined


notify() ​

notify(level, title, message?, options?): NotificationHandle | undefined

Defined in: ui/Notifier.ts:216

Dispatch a notification to the UIManager.

Parameters ​

level ​

NotificationLevel

The severity level of the notification.

title ​

string

The title to display in the notification.

message? ​

string

Optional detailed message for the notification.

options? ​

Pick<Notification, "action" | "duration">

An action to offer, and how long to stay.

Returns ​

NotificationHandle | undefined

A handle onto the toast, or undefined where there is nowhere to show one (a UI mode with no notification slot).


success() ​

success(title, message?, options?): NotificationHandle | undefined

Defined in: ui/Notifier.ts:226

Parameters ​

title ​

string

message? ​

string

options? ​

Pick<Notification, "action" | "duration">

Returns ​

NotificationHandle | undefined


warning() ​

warning(title, message?, options?): NotificationHandle | undefined

Defined in: ui/Notifier.ts:230

Parameters ​

title ​

string

message? ​

string

options? ​

Pick<Notification, "action" | "duration">

Returns ​

NotificationHandle | undefined