registerToolbarButton()

Function of @saij/wp-app-framework.

import { registerToolbarButton } from '@saij/wp-app-framework';
function registerToolbarButton(block: string, component: Component<ToolbarButtonProps>): void

Adds a button to the toolbar of a block.

ParameterTypeDescription
blockstringThe block name without namespace, e.g. hero.
componentComponent<ToolbarButtonProps>The button; it receives the block props. Render a ToolbarButton of @wordpress/components.