@wordpress/block-library
Version:
Block library for the WordPress editor.
40 lines (39 loc) • 936 B
JavaScript
import { __ } from "@wordpress/i18n";
import { buttons } from "@wordpress/icons";
import initBlock from "../utils/init-block.mjs";
import deprecated from "./deprecated.mjs";
import transforms from "./transforms.mjs";
import edit from "./edit.mjs";
import metadata from "./block.json";
import save from "./save.mjs";
// packages/block-library/src/buttons/index.js
const { name } = metadata;
const settings = {
icon: buttons,
example: {
attributes: { layout: {
type: "flex",
justifyContent: "center"
} },
innerBlocks: [{
name: "core/button",
attributes: { text: __("Find out more") }
}, {
name: "core/button",
attributes: { text: __("Contact us") }
}]
},
deprecated,
transforms,
template: [["core/button"]],
templateInsertUpdatesSelection: true,
edit,
save
};
const init = () => initBlock({
name,
metadata,
settings
});
export { init, metadata, name, settings };
//# sourceMappingURL=index.mjs.map