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

63 lines (62 loc) 2.17 kB
import { jsxs as i, jsx as e, Fragment as o } from "react/jsx-runtime"; import { calculateFriendlyFileSize as d } from "../../utils/functions/calculateFriendlyFileSize.js"; import { Box as g, Tooltip as f } from "@mui/material"; import r from "pluralize"; import c from "../IconSvg/IconSvg.js"; import { TOOLTIP_DELAY_SHOW as h } from "../SynapseTable/SynapseTableConstants.js"; function y(m) { const { numFiles: l, numPackagableFiles: n, numBytes: s } = m, t = l - n, a = l === 0, p = a ? "SRC-inactive" : "SRC-primary-text-color"; return /* @__PURE__ */ i( g, { sx: { display: "flex", alignItems: "center", justifyContent: "start ", gap: "25px", fontWeight: "bold", svg: { mr: "5px" } }, children: [ /* @__PURE__ */ e("span", { children: !a && /* @__PURE__ */ i(o, { children: [ l.toLocaleString(), " ", r("File", l) ] }) }), /* @__PURE__ */ i("span", { children: [ /* @__PURE__ */ e("span", { className: p, children: /* @__PURE__ */ e(c, { wrap: !1, icon: "packagableFile" }) }), !a && /* @__PURE__ */ i(o, { children: [ n.toLocaleString(), " ", r("File", n), " eligible for packaging" ] }) ] }), s > 0 && /* @__PURE__ */ e( f, { title: "This is the total size of all files in the Download List that are available to download.", enterNextDelay: h, placement: "top", children: /* @__PURE__ */ e("span", { className: "item", children: d(s) }) } ), t > 0 && /* @__PURE__ */ i("span", { className: "item", children: [ /* @__PURE__ */ e("span", { className: "SRC-warning-color", children: /* @__PURE__ */ e(c, { icon: "warningOutlined" }) }), !a && /* @__PURE__ */ i(o, { children: [ t.toLocaleString(), " ", r("File", t), " ineligible for packaging" ] }) ] }) ] } ); } export { y as default }; //# sourceMappingURL=DownloadDetails.js.map