synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
61 lines (60 loc) • 2.1 kB
JavaScript
import { jsxs as n, Fragment as c, jsx as e } from "react/jsx-runtime";
import { useGetFileBatch as m } from "../../../synapse-queries/file/useFiles.js";
import { Typography as t, Box as f } from "@mui/material";
import p from "../../DirectDownloadButton.js";
import u from "../../IconSvg/IconSvg.js";
function g(r) {
const { title: a, description: l, fileHandleAssociation: i, downloadButtonText: o } = r, { data: d } = m(
{
requestedFiles: [i],
includeFileHandles: !0,
includePreSignedURLs: !1,
includePreviewPreSignedURLs: !1
},
{
enabled: !!i
}
), s = d?.requestedFiles[0]?.fileHandle?.fileName;
return /* @__PURE__ */ n(c, { children: [
/* @__PURE__ */ e(t, { variant: "headline3", sx: { mt: 4, mb: 2 }, children: a }),
/* @__PURE__ */ e(t, { variant: "body1", sx: { my: 2 }, children: l }),
/* @__PURE__ */ e(t, { variant: "body1", children: "Download this file:" }),
/* @__PURE__ */ e(t, { variant: "smallText1", sx: { my: 0.5 }, children: /* @__PURE__ */ e("strong", { children: s }) }),
/* @__PURE__ */ n(
f,
{
sx: {
display: "flex",
alignItems: "center",
justifyContent: "flex-start",
gap: 2,
backgroundColor: "tertiary.100",
p: 2.5,
my: 2,
flexWrap: { xs: "nowrap", md: "wrap-reverse" }
},
children: [
/* @__PURE__ */ e(
p,
{
variant: "outlined",
fileHandleAssociation: i,
fileName: o,
endIcon: /* @__PURE__ */ e(u, { icon: "download", wrap: !1 }),
sx: { whiteSpace: "nowrap", flexShrink: 0 }
}
),
/* @__PURE__ */ n(t, { variant: "body1", children: [
"You must fill out and upload this exact version of the template.",
" ",
/* @__PURE__ */ e("strong", { children: "No other versions will be accepted." })
] })
]
}
)
] });
}
export {
g as default
};
//# sourceMappingURL=DocumentTemplate.js.map