@wordpress/block-library
Version:
Block library for the WordPress editor.
20 lines (19 loc) • 900 B
JavaScript
import { useBlockProps, useInnerBlocksProps } from "@wordpress/block-editor";
import CommentsInspectorControls from "./comments-inspector-controls.mjs";
import CommentsLegacy from "./comments-legacy.mjs";
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
// packages/block-library/src/comments/edit/index.jsx
function CommentsEdit(props) {
const { attributes, setAttributes, clientId } = props;
const { tagName: TagName, legacy } = attributes;
const blockProps = useBlockProps();
const innerBlocksProps = useInnerBlocksProps(blockProps);
if (legacy) return /* @__PURE__ */ jsx(CommentsLegacy, { ...props });
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(CommentsInspectorControls, {
attributes,
setAttributes,
clientId
}), /* @__PURE__ */ jsx(TagName, { ...innerBlocksProps })] });
}
export { CommentsEdit as default };
//# sourceMappingURL=index.mjs.map