UNPKG

@wordpress/block-library

Version:
26 lines (22 loc) 529 B
/** * 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 } />; }