synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
55 lines (54 loc) • 1.33 kB
JavaScript
import { jsx as e, jsxs as b } from "react/jsx-runtime";
import { TranslatableString as x, ADDITIONAL_PROPERTY_FLAG as g } from "@rjsf/utils";
import { GridLegacy as r, TextField as A } from "@mui/material";
function N(d) {
const {
id: a,
classNames: i,
disabled: s,
label: o,
onKeyChange: c,
readonly: n,
required: m,
schema: u,
children: l,
registry: y
} = d, { translateString: f } = y, p = f(x.KeyLabel, [""]);
if (!(g in u))
return /* @__PURE__ */ e("div", { className: i, children: l });
const h = ({ target: t }) => {
t && c(t.value);
};
return /* @__PURE__ */ e("div", { className: i, children: /* @__PURE__ */ b(
r,
{
container: !0,
columnSpacing: 2,
rowSpacing: 0,
sx: {
my: 1
},
children: [
/* @__PURE__ */ e(r, { item: !0, xs: 3, children: /* @__PURE__ */ e(
A,
{
fullWidth: !0,
required: m,
label: p,
defaultValue: o,
disabled: s || n,
id: `${a}-key`,
name: `${a}-key`,
onBlur: n ? void 0 : h,
type: "text"
}
) }),
l
]
}
) });
}
export {
N as default
};
//# sourceMappingURL=SynapseAnnotationsWrapIfAdditionalTemplate.js.map