UNPKG

@wordpress/block-library

Version:
16 lines (15 loc) 543 B
import { jsx } from "react/jsx-runtime"; import clsx from "clsx"; import { RichText, useBlockProps } from "@wordpress/block-editor"; 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