@wordpress/block-library
Version:
Block library for the WordPress editor.
19 lines (18 loc) • 684 B
JavaScript
// packages/block-library/src/quote/save.js
import clsx from "clsx";
import { InnerBlocks, RichText, useBlockProps } from "@wordpress/block-editor";
import { jsx, jsxs } from "react/jsx-runtime";
function save({ attributes }) {
const { textAlign, citation } = attributes;
const className = clsx({
[`has-text-align-${textAlign}`]: textAlign
});
return /* @__PURE__ */ jsxs("blockquote", { ...useBlockProps.save({ className }), children: [
/* @__PURE__ */ jsx(InnerBlocks.Content, {}),
!RichText.isEmpty(citation) && /* @__PURE__ */ jsx(RichText.Content, { tagName: "cite", value: citation })
] });
}
export {
save as default
};
//# sourceMappingURL=save.js.map