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

71 lines (70 loc) 1.85 kB
import { jsxs as l, Fragment as f, jsx as o } from "react/jsx-runtime"; import { IconButton as h, Menu as C, MenuItem as i, Divider as g } from "@mui/material"; import { useState as a } from "react"; import v from "../IconSvg/IconSvg.js"; import { WarningDialog as D } from "../SynapseForm/WarningDialog.js"; function S({ onSave: c, onDelete: s }) { const [u, n] = a(!1), [t, r] = a(null), d = !!t, m = (p) => { r(p.currentTarget); }, e = () => { r(null); }; return /* @__PURE__ */ l(f, { children: [ /* @__PURE__ */ o( D, { title: "Delete Evaluation Round", content: "Are you sure you want to delete this Evaluation Round?", open: u, confirmButtonText: "Delete", onConfirm: () => { s(), n(!1); }, onConfirmCallbackArgs: [], onCancel: () => { n(!1); }, confirmButtonColor: "error" } ), /* @__PURE__ */ o(h, { onClick: m, "aria-label": "Round Options", children: /* @__PURE__ */ o(v, { icon: "verticalEllipsis", wrap: !1 }) }), /* @__PURE__ */ l( C, { "aria-label": "Round Options", anchorEl: t, open: d, onClose: e, slotProps: { paper: { sx: { minWidth: "120px" } } }, children: [ /* @__PURE__ */ o( i, { onClick: () => { e(), c(); }, children: "Save" } ), /* @__PURE__ */ o(g, {}), /* @__PURE__ */ o( i, { onClick: () => { e(), n(!0); }, children: "Delete" } ) ] } ) ] }); } export { S as EvaluationRoundEditorDropdown }; //# sourceMappingURL=EvaluationRoundEditorDropdown.js.map