synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
61 lines (60 loc) • 1.42 kB
JavaScript
import { jsx as o, jsxs as l } from "react/jsx-runtime";
import { WideButton as c } from "../styled/WideButton.js";
import { Box as p } from "@mui/material";
import { useState as f } from "react";
import { ConfirmationDialog as d } from "../ConfirmationDialog/ConfirmationDialog.js";
import u from "./DynamicForm.js";
const D = ({
schemaUrl: r,
uiSchemaUrl: e,
postUrl: i,
submitButtonText: m
}) => {
const [a, n] = f(!1), s = () => {
n(!0);
}, t = () => {
n(!1);
};
return /* @__PURE__ */ o("div", { className: "browse-tools-page", children: /* @__PURE__ */ l(p, { sx: { margin: "10px 0px 50px 0px" }, children: [
/* @__PURE__ */ o(
c,
{
className: "highlightSubmitToolButton",
variant: "contained",
onClick: s,
children: m
}
),
/* @__PURE__ */ o(
d,
{
open: a,
title: "",
content: /* @__PURE__ */ o(
u,
{
schemaUrl: r,
uiSchemaUrl: e,
postUrl: i,
onSubmit: () => {
t();
}
}
),
onCancel: t,
onConfirm: () => {
},
confirmButtonProps: {
sx: { display: "none" }
},
cancelButtonProps: {
children: "cancel"
}
}
)
] }) });
};
export {
D as default
};
//# sourceMappingURL=DynamicFormModal.js.map