@wordpress/block-library
Version:
Block library for the WordPress editor.
30 lines (29 loc) • 704 B
JavaScript
import { createBlock } from "@wordpress/blocks";
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
})
])
)
)
}
]
};
var transforms_default = transforms;
export {
transforms_default as default
};
//# sourceMappingURL=transforms.js.map