@wordpress/block-library
Version:
Block library for the WordPress editor.
71 lines (70 loc) • 1.54 kB
JavaScript
/**
* WordPress dependencies
*/
import { __ } from '@wordpress/i18n';
import { loop as icon } from '@wordpress/icons';
/**
* Internal dependencies
*/
import initBlock from '../utils/init-block';
const metadata = {
$schema: "https://schemas.wp.org/trunk/block.json",
apiVersion: 3,
name: "core/query-no-results",
title: "No Results",
category: "theme",
description: "Contains the block elements used to render content when no query results are found.",
ancestor: ["core/query"],
textdomain: "default",
usesContext: ["queryId", "query"],
supports: {
align: true,
reusable: false,
html: false,
color: {
gradients: true,
link: true
},
typography: {
fontSize: true,
lineHeight: true,
__experimentalFontFamily: true,
__experimentalFontWeight: true,
__experimentalFontStyle: true,
__experimentalTextTransform: true,
__experimentalTextDecoration: true,
__experimentalLetterSpacing: true,
__experimentalDefaultControls: {
fontSize: true
}
},
interactivity: {
clientNavigation: true
}
}
};
import edit from './edit';
import save from './save';
const {
name
} = metadata;
export { metadata, name };
export const settings = {
icon,
edit,
save,
example: {
innerBlocks: [{
name: 'core/paragraph',
attributes: {
content: __('No posts were found.')
}
}]
}
};
export const init = () => initBlock({
name,
metadata,
settings
});
//# sourceMappingURL=index.js.map