@wordpress/block-library
Version:
Block library for the WordPress editor.
88 lines (87 loc) • 1.53 kB
JavaScript
import { __ } from "@wordpress/i18n";
import { blockTable } from "@wordpress/icons";
import initBlock from "../utils/init-block.mjs";
import deprecated from "./deprecated.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/table/index.js
const { name } = metadata;
const settings = {
icon: blockTable,
example: {
attributes: {
head: [{ cells: [
{
content: __("Version"),
tag: "th"
},
{
content: __("Jazz Musician"),
tag: "th"
},
{
content: __("Release Date"),
tag: "th"
}
] }],
body: [
{ cells: [
{
content: "5.2",
tag: "td"
},
{
content: __("Jaco Pastorius"),
tag: "td"
},
{
content: __("May 7, 2019"),
tag: "td"
}
] },
{ cells: [
{
content: "5.1",
tag: "td"
},
{
content: __("Betty Carter"),
tag: "td"
},
{
content: __("February 21, 2019"),
tag: "td"
}
] },
{ cells: [
{
content: "5.0",
tag: "td"
},
{
content: __("Bebo Valdés"),
tag: "td"
},
{
content: __("December 6, 2018"),
tag: "td"
}
] }
]
},
viewportWidth: 450
},
transforms,
edit,
save,
deprecated
};
const init = () => initBlock({
name,
metadata,
settings
});
export { init, metadata, name, settings };
//# sourceMappingURL=index.mjs.map