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

73 lines (72 loc) 1.86 kB
import { jsxs as r, Fragment as l, jsx as i } from "react/jsx-runtime"; import { StyledFormControl as m } from "../../styled/StyledFormControl.js"; import { InputLabel as s, Select as u, TextField as S } from "@mui/material"; const c = { // EvaluationRoundLimitType.TOTAL is purposely omitted because an <input> in the parent handles it DAILY: "Daily Limit", WEEKLY: "Weekly Limit", MONTHLY: "Monthly Limit" }; function p({ limitInput: e, allSelectedTypes: o, onChange: n }) { return /* @__PURE__ */ r(l, { children: [ /* @__PURE__ */ r(m, { className: "limit-type", children: [ /* @__PURE__ */ i(s, { children: "Limit Type" }), /* @__PURE__ */ i( u, { fullWidth: !0, native: !0, value: e.type, onChange: (t) => { n({ type: t.target.value, maxSubmissionString: e.maxSubmissionString }); }, children: Object.entries(c).map( ([t, a]) => /* @__PURE__ */ i( "option", { value: t, disabled: o.has( t ) && t !== e.type, children: a }, t ) ) } ) ] }), /* @__PURE__ */ i( S, { fullWidth: !0, className: "limit-input", label: "Maximum Submissions", value: e.maxSubmissionString, onChange: (t) => { n({ type: e.type, maxSubmissionString: t.target.value }); }, slotProps: { htmlInput: { pattern: "[0-9]*" } } } ) ] }); } export { p as EvaluationRoundLimitOptions, c as LIMIT_TYPE_DISPLAY_NAME }; //# sourceMappingURL=EvaluationRoundLimitOptions.js.map