@wordpress/block-library
Version:
Block library for the WordPress editor.
33 lines (32 loc) • 686 B
JavaScript
import { __ } from "@wordpress/i18n";
import { button as icon } from "@wordpress/icons";
import initBlock from "../utils/init-block";
import deprecated from "./deprecated";
import edit from "./edit";
import metadata from "./block.json";
import save from "./save";
const { name } = metadata;
const settings = {
icon,
example: {
attributes: {
className: "is-style-fill",
text: __("Call to action")
}
},
edit,
save,
deprecated,
merge: (a, { text = "" }) => ({
...a,
text: (a.text || "") + text
})
};
const init = () => initBlock({ name, metadata, settings });
export {
init,
metadata,
name,
settings
};
//# sourceMappingURL=index.js.map