UNPKG

@wordpress/block-library

Version:
42 lines (41 loc) 1.09 kB
/** * WordPress dependencies */ import { useBlockProps, useInnerBlocksProps } from '@wordpress/block-editor'; /** * Internal dependencies */ import CommentsInspectorControls from './comments-inspector-controls'; import CommentsLegacy from './comments-legacy'; import TEMPLATE from './template'; import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime"; export default 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: attributes, setAttributes: setAttributes, clientId: clientId }), /*#__PURE__*/_jsx(TagName, { ...innerBlocksProps })] }); } //# sourceMappingURL=index.js.map