@wordpress/block-library
Version:
Block library for the WordPress editor.
14 lines (13 loc) • 553 B
JavaScript
import { createBlock } from "@wordpress/blocks";
// packages/block-library/src/text-columns/transforms.js
const transforms = { to: [{
type: "block",
blocks: ["core/columns"],
transform: ({ className, columns, content, width }) => createBlock("core/columns", {
align: "wide" === width || "full" === width ? width : void 0,
className,
columns
}, content.map(({ children }) => createBlock("core/column", {}, [createBlock("core/paragraph", { content: children })])))
}] };
export { transforms as default };
//# sourceMappingURL=transforms.mjs.map