This documentation describes unreleased changes on the main branch.

registerPanel()

Function of @saij/wp-app-framework.

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

Adds a panel to the inspector of a block, after the generated controls. Shown in the editing mode default only.

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