BlockSuite API Documentation / @blocksuite/blocks / NotificationService
Interface: NotificationService
Methods
confirm()
confirm(
options
):Promise
<boolean
>
Parameters
options
abort
AbortSignal
cancelText
string
confirmText
string
message
string
| TemplateResult
title
string
| TemplateResult
Returns
Promise
<boolean
>
Defined in
packages/affine/shared/dist/services/notification-service.d.ts:8
notify()
notify(
options
):void
Parameters
options
abort
AbortSignal
accent
"info"
| "success"
| "error"
| "warning"
action
{ label
: string
| TemplateResult
; onClick
: () => void
; }
action.label
string
| TemplateResult
action.onClick
() => void
duration
number
message
string
| TemplateResult
onClose
() => void
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
abort
AbortSignal
autofill
string
cancelText
string
confirmText
string
message
string
| TemplateResult
placeholder
string
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?
duration
number
portal
HTMLElement
Returns
void
Defined in
packages/affine/shared/dist/services/notification-service.d.ts:4