UNPKG

@wordpress/block-library

Version:
27 lines (26 loc) • 900 B
import { __ } from "@wordpress/i18n"; import { code } from "@wordpress/icons"; import initBlock from "../utils/init-block.mjs"; import edit from "./edit.mjs"; import metadata from "./block.json"; import save from "./save.mjs"; import transforms from "./transforms.mjs"; // packages/block-library/src/code/index.js const { name } = metadata; const settings = { icon: code, example: { attributes: { content: __("// A “block” is the abstract term used\n// to describe units of markup that\n// when composed together, form the\n// content or layout of a page.\nregisterBlockType( name, settings );") } }, merge(attributes, attributesToMerge) { return { content: attributes.content + "\n\n" + attributesToMerge.content }; }, transforms, edit, save }; const init = () => initBlock({ name, metadata, settings }); export { init, metadata, name, settings }; //# sourceMappingURL=index.mjs.map