synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
70 lines (69 loc) • 1.73 kB
JavaScript
import { jsx as r } from "react/jsx-runtime";
import x from "../../assets/illustrations/index.js";
import { spreadSx as B } from "../../theme/spreadSx.js";
import { useCookiePreferences as C } from "../../utils/hooks/useCookiePreferences.js";
import { useState as S } from "react";
import b from "../FullWidthAlert/FullWidthAlert.js";
const h = [
"Challenges",
"CohortBuilder",
"DataAccessManagement",
"Datasets",
"Discussions",
"Docker",
"Favorites",
"Files",
"Following",
"Projects",
"Tables",
"Teams",
"TrashCan",
"Wikis",
"Donate",
"UnderConstruction"
];
function s(e) {
return "orientation_banner_" + e.toLowerCase() + "_dismissed";
}
const y = h.map(
(e) => s(e)
);
function D(e) {
const { name: o, title: a, text: i, primaryButtonConfig: l, secondaryButtonConfig: c, sx: m } = e, [u] = C(), t = s(o), [d, f] = S(
localStorage.getItem(t) === null
), p = (n) => ({
[n.breakpoints.down("md")]: {
display: "none"
},
backgroundColor: "#F9FAFB",
border: "none",
boxShadow: "0px 4px 4px rgba(0, 0, 0, 0.05)",
minHeight: "152px",
mt: 0,
paddingLeft: 4,
".MuiAlert-icon": { mr: 5 },
".MuiAlertTitle-root": { color: n.palette.grey[1e3] }
}), g = x[o];
return /* @__PURE__ */ r(
b,
{
show: d,
isGlobal: !1,
title: a,
description: i,
primaryButtonConfig: l,
secondaryButtonConfig: c,
icon: /* @__PURE__ */ r(g, {}),
onClose: () => {
u.functionalAllowed && localStorage.setItem(t, "true"), f(!1);
},
sx: B(p, m)
}
);
}
export {
y as ORIENTATION_BANNER_KEYS,
D as default,
s as getOrientationBannerKey
};
//# sourceMappingURL=OrientationBanner.js.map