UNPKG

@wordpress/block-library

Version:
63 lines (62 loc) 1.82 kB
import { jsx, jsxs } from "react/jsx-runtime"; import { Button, Modal } from "@wordpress/components"; import { useInstanceId } from "@wordpress/compose"; import { __ } from "@wordpress/i18n"; const convertDescription = __( "This Navigation Menu displays your website's pages. Editing it will enable you to add, delete, or reorder pages. However, new pages will no longer be added automatically." ); function ConvertToLinksModal({ onClick, onClose, disabled }) { return /* @__PURE__ */ jsxs( Modal, { onRequestClose: onClose, title: __("Edit Page List"), className: "wp-block-page-list-modal", aria: { describedby: useInstanceId( ConvertToLinksModal, "wp-block-page-list-modal__description" ) }, children: [ /* @__PURE__ */ jsx( "p", { id: useInstanceId( ConvertToLinksModal, "wp-block-page-list-modal__description" ), children: convertDescription } ), /* @__PURE__ */ jsxs("div", { className: "wp-block-page-list-modal-buttons", children: [ /* @__PURE__ */ jsx( Button, { __next40pxDefaultSize: true, variant: "tertiary", onClick: onClose, children: __("Cancel") } ), /* @__PURE__ */ jsx( Button, { __next40pxDefaultSize: true, variant: "primary", accessibleWhenDisabled: true, disabled, onClick, children: __("Edit") } ) ] }) ] } ); } export { ConvertToLinksModal, convertDescription }; //# sourceMappingURL=convert-to-links-modal.js.map