UNPKG

swagger-editor

Version:

- [Anonymized analytics](#anonymized-analytics) - [Getting started](#getting-started) - [Prerequisites](#prerequisites) - [Installation](#installation) - [Usage](#usage) - [Development](#development) - [Prerequisites](#prerequisites) - [Setting

91 lines (90 loc) 2.45 kB
import "react"; import e from "prop-types"; import { jsx as t, jsxs as n } from "react/jsx-runtime"; //#region src/plugins/dialogs/components/AlertDialog.jsx var r = ({ isOpen: e = !1, title: r = "", getComponent: i, children: a = null, onClose: o = () => {} }) => { let s = i("Modal"), c = i("ModalHeader"), l = i("ModalTitle"), u = i("ModalBody"), d = i("ModalFooter"); return /* @__PURE__ */ n(s, { isOpen: e, contentLabel: r, children: [ /* @__PURE__ */ n(c, { children: [/* @__PURE__ */ t("button", { type: "button", className: "close", onClick: o, children: /* @__PURE__ */ t("span", { "aria-hidden": "true", children: "x" }) }), /* @__PURE__ */ t(l, { children: r })] }), /* @__PURE__ */ t(u, { children: a }), /* @__PURE__ */ t(d, { children: /* @__PURE__ */ t("button", { type: "button", className: "btn btn-primary", onClick: o, children: "OK" }) }) ] }); }; r.propTypes = { isOpen: e.bool, title: e.string, getComponent: e.func.isRequired, children: e.node, onClose: e.func }; //#endregion //#region src/plugins/dialogs/components/ConfirmDialog.jsx var i = ({ isOpen: e = !1, title: r = "", getComponent: i, children: a = null, onClose: o = () => {} }) => { let s = i("Modal"), c = i("ModalHeader"), l = i("ModalTitle"), u = i("ModalBody"), d = i("ModalFooter"); return /* @__PURE__ */ n(s, { isOpen: e, contentLabel: r, children: [ /* @__PURE__ */ n(c, { children: [/* @__PURE__ */ t("button", { type: "button", className: "close", onClick: () => { o(!1); }, children: /* @__PURE__ */ t("span", { "aria-hidden": "true", children: "x" }) }), /* @__PURE__ */ t(l, { children: r })] }), /* @__PURE__ */ t(u, { children: a }), /* @__PURE__ */ n(d, { children: [/* @__PURE__ */ t("button", { type: "button", className: "btn btn-secondary", onClick: () => { o(!1); }, children: "Cancel" }), /* @__PURE__ */ t("button", { type: "button", className: "btn btn-primary", onClick: () => { o(!0); }, children: "OK" })] }) ] }); }; i.propTypes = { isOpen: e.bool, title: e.string, getComponent: e.func.isRequired, children: e.node, onClose: e.func }; //#endregion //#region src/plugins/dialogs/index.js var a = () => ({ components: { AlertDialog: r, ConfirmDialog: i } }); //#endregion export { a as default }; //# sourceMappingURL=index.js.map