synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
85 lines (84 loc) • 2.22 kB
JavaScript
import { jsx as e, Fragment as n, jsxs as o } from "react/jsx-runtime";
import { InlineBadge as m } from "../../styled/InlineBadge.js";
import { Paper as p, Button as d, Box as r, Typography as x } from "@mui/material";
import { useAtomValue as f } from "jotai";
import g from "pluralize";
import { isRowSelectionUIFloatingAtom as u } from "../../QueryWrapper/TableRowSelectionState.js";
function b(l) {
const {
show: a = !0,
selectedRowCount: t,
onClearSelection: s,
customControls: c = /* @__PURE__ */ e(n, {})
} = l, i = f(u);
return a ? /* @__PURE__ */ o(
p,
{
sx: {
display: "flex",
alignItems: "center",
justifyContent: "space-between",
position: i ? "fixed" : "absolute",
bottom: i ? 0 : -70,
left: 0,
width: "100%",
height: "70px",
zIndex: 1,
px: 2.5
},
children: [
/* @__PURE__ */ e(
d,
{
variant: "text",
color: "error",
onClick: () => {
s();
},
children: "Clear Selection"
}
),
/* @__PURE__ */ o(
r,
{
sx: {
display: "flex",
gap: 2.5,
alignItems: "center"
},
children: [
/* @__PURE__ */ o(
r,
{
sx: {
display: "flex",
gap: 1.5
},
children: [
/* @__PURE__ */ e(
m,
{
badgeContent: t.toLocaleString(),
color: "primary",
max: 1 / 0
}
),
/* @__PURE__ */ o(x, { variant: "body1", children: [
g("Row", t),
" Selected"
] })
]
}
),
c
]
}
)
]
}
) : /* @__PURE__ */ e(n, {});
}
export {
b as RowSelectionUI
};
//# sourceMappingURL=RowSelectionUI.js.map