Skip to content

BlockSuite API Documentation / @blocksuite/blocks / NotificationService

Interface: NotificationService

Methods

confirm()

confirm(options): Promise<boolean>

Parameters

options

options.abort?: AbortSignal

options.cancelText?: string

options.confirmText?: string

options.message: string | TemplateResult

options.title: string | TemplateResult

Returns

Promise<boolean>

Defined in

packages/affine/shared/dist/services/notification-service.d.ts:8


notify()

notify(options): void

Parameters

options

options.abort?: AbortSignal

options.accent?: "error" | "info" | "success" | "warning"

options.action?

options.action.label: string | TemplateResult

options.action.onClick

options.duration?: number

options.message?: string | TemplateResult

options.onClose

options.title: string | TemplateResult

Returns

void

Defined in

packages/affine/shared/dist/services/notification-service.d.ts:24


prompt()

prompt(options): Promise<null | string>

Parameters

options

options.abort?: AbortSignal

options.autofill?: string

options.cancelText?: string

options.confirmText?: string

options.message: string | TemplateResult

options.placeholder?: string

options.title: string | TemplateResult

Returns

Promise<null | string>

Defined in

packages/affine/shared/dist/services/notification-service.d.ts:15


toast()

toast(message, options?): void

Parameters

message: string

options?

options.duration?: number

options.portal?: HTMLElement

Returns

void

Defined in

packages/affine/shared/dist/services/notification-service.d.ts:4