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

61 lines (60 loc) 1.57 kB
import { jsxs as t, jsx as e, Fragment as h } from "react/jsx-runtime"; import { Box as F, FormControlLabel as x, Checkbox as d, Radio as _ } from "@mui/material"; function g(l) { const { id: i, label: s, count: n, isDropdown: o, checked: c, onChange: r, onHover: m, inputType: u } = l; return /* @__PURE__ */ t( F, { className: "EnumFacetFilter__checkboxContainer", onClick: () => { o && r(!c); }, onMouseEnter: m, sx: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [ /* @__PURE__ */ e( x, { control: u === "checkbox" ? /* @__PURE__ */ e(d, {}) : /* @__PURE__ */ e(_, {}), className: "EnumFacetFilter__checkbox", sx: { overflowWrap: "anywhere" }, onClick: (a) => a.stopPropagation(), onChange: (a, p) => { r(p); }, checked: c, label: s }, `${i}` ), n != null && /* @__PURE__ */ t(h, { children: [ o && /* @__PURE__ */ t("span", { className: "EnumFacetFilter__count", children: [ "(", n.toLocaleString(), ")" ] }), !o && /* @__PURE__ */ e("div", { className: "EnumFacetFilter__count", children: n.toLocaleString() }) ] }) ] } ); } export { g as EnumFacetFilterOption }; //# sourceMappingURL=EnumFacetFilterOption.js.map