@wordpress/block-library
Version:
Block library for the WordPress editor.
1 lines • 1.48 kB
Source Map (JSON)
{"version":3,"file":"index.cjs","names":["useBlockProps","useInnerBlocksProps","CommentsLegacy","CommentsInspectorControls"],"sources":["../../../src/comments/edit/index.jsx"],"sourcesContent":["import { useBlockProps, useInnerBlocksProps } from '@wordpress/block-editor';\nimport CommentsInspectorControls from './comments-inspector-controls';\nimport CommentsLegacy from './comments-legacy';\n\nexport default function CommentsEdit( props ) {\n\tconst { attributes, setAttributes, clientId } = props;\n\tconst { tagName: TagName, legacy } = attributes;\n\n\tconst blockProps = useBlockProps();\n\tconst innerBlocksProps = useInnerBlocksProps( blockProps );\n\n\tif ( legacy ) {\n\t\treturn <CommentsLegacy { ...props } />;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<CommentsInspectorControls\n\t\t\t\tattributes={ attributes }\n\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\tclientId={ clientId }\n\t\t\t/>\n\t\t\t<TagName { ...innerBlocksProps } />\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,SAAwB,aAAc,OAAQ;CAC7C,MAAM,EAAE,YAAY,eAAe,aAAa;CAChD,MAAM,EAAE,SAAS,SAAS,WAAW;CAErC,MAAM,cAAA,GAAaA,wBAAAA,cAAAA,CAAc;CACjC,MAAM,oBAAA,GAAmBC,wBAAAA,oBAAAA,CAAqB,UAAW;CAEzD,IAAK,QACJ,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAACC,sBAAAA,SAAD,EAAgB,GAAK,MAAS,CAAA;CAGtC,OACC,iBAAA,GAAA,kBAAA,KAAA,CAAA,kBAAA,UAAA,EAAA,UAAA,CACC,iBAAA,GAAA,kBAAA,IAAA,CAACC,kCAAAA,SAAD;EACc;EACG;EACL;CACX,CAAA,GACD,iBAAA,GAAA,kBAAA,IAAA,CAAC,SAAD,EAAS,GAAK,iBAAoB,CAAA,CACjC,EAAA,CAAA;AAEJ"}