@wordpress/block-library
Version:
Block library for the WordPress editor.
74 lines (73 loc) • 1.43 kB
JavaScript
// packages/block-library/src/table-of-contents/index.js
import { __ } from "@wordpress/i18n";
import { tableOfContents as icon } from "@wordpress/icons";
import initBlock from "../utils/init-block";
import metadata from "./block.json";
import edit from "./edit";
import save from "./save";
var { name } = metadata;
var settings = {
icon,
edit,
save,
example: {
innerBlocks: [
{
name: "core/heading",
attributes: {
level: 2,
content: __("Heading")
}
},
{
name: "core/heading",
attributes: {
level: 3,
content: __("Subheading")
}
},
{
name: "core/heading",
attributes: {
level: 2,
content: __("Heading")
}
},
{
name: "core/heading",
attributes: {
level: 3,
content: __("Subheading")
}
}
],
attributes: {
headings: [
{
content: __("Heading"),
level: 2
},
{
content: __("Subheading"),
level: 3
},
{
content: __("Heading"),
level: 2
},
{
content: __("Subheading"),
level: 3
}
]
}
}
};
var init = () => initBlock({ name, metadata, settings });
export {
init,
metadata,
name,
settings
};
//# sourceMappingURL=index.js.map