@wordpress/block-library
Version:
Block library for the WordPress editor.
45 lines (44 loc) • 1.07 kB
JavaScript
import { __ } from "@wordpress/i18n";
import { cover } from "@wordpress/icons";
import initBlock from "../utils/init-block.mjs";
import deprecated from "./deprecated.mjs";
import edit from "./edit/index.mjs";
import metadata from "./block.json";
import save from "./save.mjs";
import transforms from "./transforms.mjs";
import variations from "./variations.mjs";
// packages/block-library/src/cover/index.js
const { name } = metadata;
const settings = {
icon: cover,
example: {
attributes: {
customOverlayColor: "#065174",
dimRatio: 40,
url: "https://s.w.org/images/core/5.3/Windbuchencom.jpg",
style: {
typography: { fontSize: 48 },
color: { text: "white" }
}
},
innerBlocks: [{
name: "core/paragraph",
attributes: {
content: `<strong>${__("Snow Patrol")}</strong>`,
style: { typography: { textAlign: "center" } }
}
}]
},
transforms,
save,
edit,
deprecated,
variations
};
const init = () => initBlock({
name,
metadata,
settings
});
export { init, metadata, name, settings };
//# sourceMappingURL=index.mjs.map