synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
87 lines (86 loc) • 2.42 kB
JavaScript
import { jsxs as e, jsx as n } from "react/jsx-runtime";
import c from "../IconSvg/IconSvg.js";
import { Typography as a, styled as d, Box as l } from "@mui/material";
const t = d(l, {
label: "OpenDataContainer"
})(({ theme: o }) => ({
background: o.palette.grey[100],
padding: `${o.spacing(2.5)} ${o.spacing(4)}`,
border: `1px solid ${o.palette.grey[300]}`,
borderRadius: "3px",
marginBottom: o.spacing(2)
}));
function u(o) {
const { isOpenData: r, isPublic: s, currentUserCanUpdateSharingSettings: i } = o;
return r && s ? /* @__PURE__ */ e(t, { display: "flex", gap: 1, children: [
/* @__PURE__ */ n(c, { icon: "checkCircle", color: "success", wrap: !1 }),
/* @__PURE__ */ e("div", { children: [
/* @__PURE__ */ n(
a,
{
variant: "body1",
sx: {
color: "text.secondary"
},
children: /* @__PURE__ */ n("strong", { children: "This is anonymous access data." })
}
),
/* @__PURE__ */ n(
a,
{
variant: "body1",
sx: {
color: "text.secondary"
},
children: "Anyone can download it, even if they aren’t logged in to Synapse."
}
)
] })
] }) : r && !s && i ? /* @__PURE__ */ e(t, { children: [
/* @__PURE__ */ n(
a,
{
variant: "body1",
sx: {
color: "text.secondary"
},
children: /* @__PURE__ */ n("strong", { children: "This is not anonymous access data." })
}
),
/* @__PURE__ */ n(
a,
{
variant: "body1",
sx: {
color: "text.secondary"
},
children: "You must grant public access for all users to be able to anonymously download it."
}
)
] }) : !r && s && i ? /* @__PURE__ */ e(t, { children: [
/* @__PURE__ */ n(
a,
{
variant: "body1",
sx: {
color: "text.secondary"
},
children: /* @__PURE__ */ n("strong", { children: "Users must be logged in to download public access data." })
}
),
/* @__PURE__ */ n(
a,
{
variant: "body1",
sx: {
color: "text.secondary"
},
children: "This data is publicly viewable, but only registered and logged-in users can download it."
}
)
] }) : null;
}
export {
u as default
};
//# sourceMappingURL=OpenData.js.map