@wordpress/block-library
Version:
Block library for the WordPress editor.
26 lines (22 loc) • 529 B
JavaScript
/**
* WordPress dependencies
*/
import { useBlockProps, useInnerBlocksProps } from '@wordpress/block-editor';
import { __ } from '@wordpress/i18n';
const TEMPLATE = [
[
'core/paragraph',
{
placeholder: __(
'Add text or blocks that will display when a query returns no results.'
),
},
],
];
export default function QueryNoResultsEdit() {
const blockProps = useBlockProps();
const innerBlocksProps = useInnerBlocksProps( blockProps, {
template: TEMPLATE,
} );
return <div { ...innerBlocksProps } />;
}