コンテンツへスキップ

pivotick v3.0.0


pivotick / 通知者

インターフェース: Notifier ​

定義: ui/Notifier.ts:197

グラフ UI で通知メッセージを管理および表示します。

このコンポーネントを使用して、成功、警告、エラー、または情報メッセージを表示します。 ユーザーに。

例 ​

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

通知は 1 つのアクションを実行し、デフォルトの 4 秒を超えて存続することもできます。 これは、結果がそれ自体を元に戻す方法です。

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

メソッド ​

error() ​

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

定義: ui/Notifier.ts:234

パラメータ ​

title ​

string

message? ​

string

options? ​

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

返品 ​

NotificationHandle | undefined


info() ​

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

定義: ui/Notifier.ts:238

パラメータ ​

title ​

string

message? ​

string

options? ​

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

返品 ​

NotificationHandle | undefined


notify() ​

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

定義: ui/Notifier.ts:216

UIManager に通知を送信します。

パラメータ ​

level ​

NotificationLevel

通知の重大度レベル。

title ​

string

通知に表示するタイトル。

message? ​

string

オプションの通知の詳細メッセージ。

options? ​

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

提案するアクションと滞在期間。

返品 ​

NotificationHandle | undefined

トーストの取っ手、またはどこにもないundefined show one (通知スロットのない UI モード)。


success() ​

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

定義: ui/Notifier.ts:226

パラメータ ​

title ​

string

message? ​

string

options? ​

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

返品 ​

NotificationHandle | undefined


warning() ​

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

定義: ui/Notifier.ts:230

パラメータ ​

title ​

string

message? ​

string

options? ​

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

返品 ​

NotificationHandle | undefined