This documentation describes unreleased changes on the main branch.

registerSupportControl()

Function of @saij/wp-app-framework.

import { registerSupportControl } from '@saij/wp-app-framework';
function registerSupportControl<V = unknown>(attribute: string, component: Component<ControlProps<V>>): void

Replaces the generated control of a block support (#[BlockSupport]) in every block of your theme or plugin that uses it.

ParameterTypeDescription
attributestringThe attribute of the block support, as in #[BlockSupport(attribute: …)].
componentComponent<ControlProps<V>>The control; it receives the value of the attribute, onChange and the block props.