pivotick / Notificador
Interface: Notifier
Definido em: ui/Notifier.ts:197
Gerencia e exibe mensagens de notificação na UI gráfica.
Use este componente para mostrar mensagens de sucesso, aviso, erro ou informações ao usuário.
Exemplos
graph.notifier.warning('This is a warning', 'Content of the message goes here.')Uma notificação também pode realizar uma ação e sobreviver aos quatro segundos padrão, que é como um resultado se oferece para se desfazer:
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 em: ui/Notifier.ts:234
Parâmetros
title
string
message?
string
options?
Pick<Notification, "action" | "duration">
Retorno
NotificationHandle | undefined
info()
info(
title,message?,options?):NotificationHandle|undefined
Definido em: ui/Notifier.ts:238
Parâmetros
title
string
message?
string
options?
Pick<Notification, "action" | "duration">
Retorno
NotificationHandle | undefined
notify()
notify(
level,title,message?,options?):NotificationHandle|undefined
Definido em: ui/Notifier.ts:216
Envie uma notificação para o UIManager.
Parâmetros
level
O nível de gravidade da notificação.
title
string
O título a ser exibido na notificação.
message?
string
Mensagem detalhada opcional para a notificação.
options?
Pick<Notification, "action" | "duration">
Uma ação para oferecer e quanto tempo permanecer.
Retorno
NotificationHandle | undefined
Um identificador no brinde, ou undefined onde não há lugar para mostrar um (um modo de UI sem slot de notificação).
success()
success(
title,message?,options?):NotificationHandle|undefined
Definido em: ui/Notifier.ts:226
Parâmetros
title
string
message?
string
options?
Pick<Notification, "action" | "duration">
Retorno
NotificationHandle | undefined
warning()
warning(
title,message?,options?):NotificationHandle|undefined
Definido em: ui/Notifier.ts:230
Parâmetros
title
string
message?
string
options?
Pick<Notification, "action" | "duration">
Retorno
NotificationHandle | undefined