@wordpress/block-library
Version:
Block library for the WordPress editor.
21 lines (20 loc) • 668 B
JavaScript
// packages/block-library/src/accordion-panel/edit.js
import { useBlockProps, useInnerBlocksProps } from "@wordpress/block-editor";
import { jsx } from "react/jsx-runtime";
function Edit({ attributes }) {
const { allowedBlocks, templateLock, openByDefault, isSelected } = attributes;
const blockProps = useBlockProps({
"aria-hidden": !isSelected && !openByDefault,
role: "region"
});
const innerBlocksProps = useInnerBlocksProps(blockProps, {
allowedBlocks,
template: [["core/paragraph", {}]],
templateLock
});
return /* @__PURE__ */ jsx("div", { ...innerBlocksProps });
}
export {
Edit as default
};
//# sourceMappingURL=edit.js.map