UNPKG

synapse-react-client

Version:

[![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synapse-react-client) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettie

50 lines (49 loc) 1.29 kB
import { jsxs as x, jsx as e } from "react/jsx-runtime"; import { useState as c, useMemo as k } from "react"; import { MarkdownCollapse as f } from "../Markdown/MarkdownCollapse.js"; import { transformStringIntoMarkdownProps as C } from "../Markdown/MarkdownUtils.js"; import { Box as u, FormControlLabel as b, Typography as g, Checkbox as w } from "@mui/material"; function j({ studyName: r, acknowledgementStatementWikiRef: n, onSelectChange: s }) { const [o, a] = c(), [m, i] = c(!1), d = (t) => { a({ title: r, statement: t }); }, p = (t) => { const l = t.target.checked; i(l), o && s && s(o, l); }, h = k(() => C(n), [n]); return /* @__PURE__ */ x(u, { sx: { mb: "20px" }, children: [ /* @__PURE__ */ e( b, { control: /* @__PURE__ */ e( w, { checked: m, onChange: p, disabled: !o } ), label: /* @__PURE__ */ e(g, { variant: "body1", children: r }) } ), /* @__PURE__ */ e( f, { ...h, setPlainTextResult: d, showCopyPlainText: !0, textDescription: "full statement" } ) ] }); } export { j as StudyAcknowledgement }; //# sourceMappingURL=StudyAcknowledgement.js.map