UNPKG

@wordpress/block-library

Version:
32 lines (31 loc) 973 B
import { Fragment, jsx, jsxs } from "react/jsx-runtime"; import { useBlockProps, useInnerBlocksProps } from "@wordpress/block-editor"; import CommentsInspectorControls from "./comments-inspector-controls"; import CommentsLegacy from "./comments-legacy"; import TEMPLATE from "./template"; function CommentsEdit(props) { const { attributes, setAttributes, clientId } = props; const { tagName: TagName, legacy } = attributes; const blockProps = useBlockProps(); const innerBlocksProps = useInnerBlocksProps(blockProps, { template: TEMPLATE }); 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.js.map