BlockSuite API Documentation / @blocksuite/blocks / KeyboardToolbarActionItem
Type Alias: KeyboardToolbarActionItem
KeyboardToolbarActionItem:
object
Type declaration
action()?
optional
action: (ctx
) =>void
|Promise
<void
>
Parameters
• ctx: KeyboardToolbarContext
Returns
void
| Promise
<void
>
Description
The action to be executed when the item is clicked.
background?
optional
background:string
| (ctx
) =>string
|undefined
disableWhen()?
optional
disableWhen: (ctx
) =>boolean
Parameters
• ctx: KeyboardToolbarContext
Returns
boolean
Default
ts
false
Description
Whether to set the item as disabled status.
icon
icon:
KeyboardIconType
name
name:
string
showWhen()?
optional
showWhen: (ctx
) =>boolean
Parameters
• ctx: KeyboardToolbarContext
Returns
boolean
Default
ts
true
Description
Whether to show the item in the toolbar.
Defined in
packages/blocks/src/root-block/widgets/keyboard-toolbar/config.ts:99