UNPKG

@wordpress/block-library

Version:
33 lines (32 loc) 1.03 kB
// packages/block-library/src/comments/edit/index.js import { useBlockProps, useInnerBlocksProps } from "@wordpress/block-editor"; import CommentsInspectorControls from "./comments-inspector-controls"; import CommentsLegacy from "./comments-legacy"; import TEMPLATE from "./template"; import { Fragment, jsx, jsxs } from "react/jsx-runtime"; 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