synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
98 lines (97 loc) • 3.25 kB
JavaScript
import { jsxs as n, jsx as e } from "react/jsx-runtime";
import { ReactComponent as l } from "../../assets/icons/account-certified.svg.js";
import { ReactComponent as c } from "../../assets/icons/account-enabled-mfa.svg.js";
import { ReactComponent as d } from "../../assets/icons/account-validated.svg.js";
import { Card as s, Box as a, Tooltip as h, Typography as r, Link as p, Button as m } from "@mui/material";
const f = {
certified: {
label: "Certified",
description: "Has access to normal functionality.",
tooltipText: "This user has passed Sage Certification, which means they can upload data and create new projects and tables.",
icon: /* @__PURE__ */ e(l, {}),
linkHref: "https://help.synapse.org/docs/User-Types.2007072795.html"
},
validated: {
label: "Validated",
description: "Identity has been manually verified.",
tooltipText: "This user is Validated. Their identity and credentials have been manually verified by Sage Bionetworks.",
icon: /* @__PURE__ */ e(d, {}),
linkHref: "https://help.synapse.org/docs/User-Types.2007072795.html"
},
enabledMFA: {
label: "Multi-factor Authentication",
description: "User has activated MFA",
tooltipText: "This user currently has multi-factor authentication (MFA) activated.",
icon: /* @__PURE__ */ e(c, {}),
linkHref: "https://help.synapse.org/docs/Managing-Your-Account.2055405596.html#ManagingYourAccount-AddingTwo-FactorAuthentication(2FA)toyouraccount"
}
};
function b({
badgeType: o,
buttonProps: i
}) {
const t = f[o];
return /* @__PURE__ */ n(
s,
{
sx: {
maxWidth: 325,
minWidth: 250,
padding: "30px 20px"
},
children: [
/* @__PURE__ */ n(
a,
{
sx: {
display: "flex",
width: "100%",
alignItems: "center"
},
children: [
/* @__PURE__ */ e(h, { title: t.tooltipText, children: /* @__PURE__ */ e(
a,
{
sx: {
alignSelf: "start",
mr: "10px"
},
children: t.icon
}
) }),
/* @__PURE__ */ n(a, { children: [
/* @__PURE__ */ e(r, { variant: "headline3", gutterBottom: !0, component: "div", children: t.label }),
/* @__PURE__ */ e(r, { variant: "body1", sx: { color: "grey.700", mb: "10px" }, children: t.description }),
/* @__PURE__ */ e(
p,
{
target: "_blank",
rel: "noopener noreferrer",
href: t.linkHref,
children: /* @__PURE__ */ e(r, { variant: "buttonLink", children: "Learn more" })
}
)
] })
]
}
),
i && /* @__PURE__ */ e(
m,
{
fullWidth: !0,
...i,
sx: {
mt: 2,
...i.sx
}
}
)
]
}
);
}
export {
b as AccountLevelBadge,
f as accountLevelBadgeConfig
};
//# sourceMappingURL=AccountLevelBadge.js.map