Ir al contenido

pivotick v3.0.0


pivotic / Notificador

Interfaz: Notifier ​

Definido en: ui/Notifier.ts:197

Gestiona y muestra mensajes de notificación en la interfaz de usuario del gráfico.

Utilice este componente para mostrar mensajes de éxito, advertencia, error o información. al usuario.

Ejemplos ​

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

Una notificación también puede conllevar una acción y sobrevivir a los cuatro segundos predeterminados. así es como un resultado se ofrece a deshacerse:

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

Métodos ​

error() ​

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

Definido en: ui/Notifier.ts:234

Parámetros ​

title ​

string

message? ​

string

options? ​

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

Devoluciones ​

NotificationHandle | undefined


info() ​

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

Definido en: ui/Notifier.ts:238

Parámetros ​

title ​

string

message? ​

string

options? ​

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

Devoluciones ​

NotificationHandle | undefined


notify() ​

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

Definido en: ui/Notifier.ts:216

Envíe una notificación al UIManager.

Parámetros ​

level ​

NotificationLevel

El nivel de gravedad de la notificación.

title ​

string

El título que se mostrará en la notificación.

message? ​

string

Mensaje detallado opcional para la notificación.

options? ​

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

Una acción a ofrecer y cuánto tiempo permanecer.

Devoluciones ​

NotificationHandle | undefined

Un asa en la tostada, o undefined donde no hay dónde mostrar uno (un modo de interfaz de usuario sin ranura de notificación).


success() ​

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

Definido en: ui/Notifier.ts:226

Parámetros ​

title ​

string

message? ​

string

options? ​

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

Devoluciones ​

NotificationHandle | undefined


warning() ​

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

Definido en: ui/Notifier.ts:230

Parámetros ​

title ​

string

message? ​

string

options? ​

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

Devoluciones ​

NotificationHandle | undefined