BlockProps

Interface of @saij/wp-app-framework, for type checks in your IDE.

export interface BlockProps {
	attributes: Attributes;
	setAttributes: (attributes: Attributes) => void;
	clientId: string;
	isPreview: boolean;
}

Props that every component registered with the editor API receives.

Members

attributes

attributes: Attributes

The attributes of the block.

setAttributes

setAttributes: (attributes: Attributes) => void

Changes attributes of the block, like setAttributes of a block's edit component in WordPress.

clientId

clientId: string

The client ID of the block in the editor.

isPreview

isPreview: boolean

Whether the block shows its front-end preview (toolbar button "Preview") instead of the editable fields.