@wordpress/block-library
Version:
Block library for the WordPress editor.
50 lines (48 loc) • 1.85 kB
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ConvertToLinksModal = ConvertToLinksModal;
exports.convertDescription = void 0;
var _components = require("@wordpress/components");
var _compose = require("@wordpress/compose");
var _i18n = require("@wordpress/i18n");
var _jsxRuntime = require("react/jsx-runtime");
/**
* WordPress dependencies
*/
const convertDescription = exports.convertDescription = (0, _i18n.__)("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__*/(0, _jsxRuntime.jsxs)(_components.Modal, {
onRequestClose: onClose,
title: (0, _i18n.__)('Edit Page List'),
className: "wp-block-page-list-modal",
aria: {
describedby: (0, _compose.useInstanceId)(ConvertToLinksModal, 'wp-block-page-list-modal__description')
},
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
id: (0, _compose.useInstanceId)(ConvertToLinksModal, 'wp-block-page-list-modal__description'),
children: convertDescription
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
className: "wp-block-page-list-modal-buttons",
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
__next40pxDefaultSize: true,
variant: "tertiary",
onClick: onClose,
children: (0, _i18n.__)('Cancel')
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
__next40pxDefaultSize: true,
variant: "primary",
accessibleWhenDisabled: true,
disabled: disabled,
onClick: onClick,
children: (0, _i18n.__)('Edit')
})]
})]
});
}
//# sourceMappingURL=convert-to-links-modal.js.map
;