@wordpress/block-library
Version:
Block library for the WordPress editor.
20 lines (19 loc) • 671 B
JavaScript
import { RichText, useBlockProps } from "@wordpress/block-editor";
import { jsx, jsxs } from "react/jsx-runtime";
// packages/block-library/src/pullquote/save.jsx
function save({ attributes }) {
const { citation, value } = attributes;
const shouldShowCitation = !RichText.isEmpty(citation);
return /* @__PURE__ */ jsx("figure", {
...useBlockProps.save(),
children: /* @__PURE__ */ jsxs("blockquote", { children: [/* @__PURE__ */ jsx(RichText.Content, {
tagName: "p",
value
}), shouldShowCitation && /* @__PURE__ */ jsx(RichText.Content, {
tagName: "cite",
value: citation
})] })
});
}
export { save as default };
//# sourceMappingURL=save.mjs.map