@wordpress/block-library
Version:
Block library for the WordPress editor.
17 lines (16 loc) • 666 B
JavaScript
import { jsx } from "react/jsx-runtime";
import clsx from "clsx";
import { RichText, useBlockProps } from "@wordpress/block-editor";
import { isRTL } from "@wordpress/i18n";
function save({ attributes }) {
const { align, content, dropCap, direction } = attributes;
const className = clsx({
"has-drop-cap": align === (isRTL() ? "left" : "right") || align === "center" ? false : dropCap,
[`has-text-align-${align}`]: align
});
return /* @__PURE__ */ jsx("p", { ...useBlockProps.save({ className, dir: direction }), children: /* @__PURE__ */ jsx(RichText.Content, { value: content }) });
}
export {
save as default
};
//# sourceMappingURL=save.js.map