@wordpress/block-library
Version:
Block library for the WordPress editor.
17 lines (16 loc) • 589 B
JavaScript
// packages/block-library/src/heading/save.js
import clsx from "clsx";
import { RichText, useBlockProps } from "@wordpress/block-editor";
import { jsx } from "react/jsx-runtime";
function save({ attributes }) {
const { textAlign, content, level } = attributes;
const TagName = "h" + level;
const className = clsx({
[`has-text-align-${textAlign}`]: textAlign
});
return /* @__PURE__ */ jsx(TagName, { ...useBlockProps.save({ className }), children: /* @__PURE__ */ jsx(RichText.Content, { value: content }) });
}
export {
save as default
};
//# sourceMappingURL=save.js.map