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

87 lines (86 loc) 3.15 kB
import { jsxs as r, jsx as e, Fragment as l } from "react/jsx-runtime"; import { useState as c } from "react"; import b from "./FeaturedDataPlots.js"; import "../../utils/functions/EntityTypeUtils.js"; import "../../assets/ArcusBioIcon.svg.js"; import "@mui/material/SvgIcon"; import "../../assets/icons/AccessPending.svg.js"; import "../../assets/icons/AccessPendingCloud.svg.js"; import "../../assets/icons/FileWithShield.svg.js"; import "../../assets/icons/MultiFile.svg.js"; import "../../assets/icons/UnpackagableFile.svg.js"; import "../../assets/icons/bioChemicalPhysical.svg.js"; import "../../assets/icons/computationalTool.svg.js"; import "../../assets/icons/dataReuse.svg.js"; import { Box as x, Button as h, Paper as u } from "@mui/material"; import "../../assets/icons/inSilicoModel.svg.js"; import "../../assets/icons/modelSystem.svg.js"; import "../../assets/mui_components/PackagableFile.svg.js"; import "../../assets/icons/spatialProfiling.svg.js"; import "@mui/icons-material"; import _ from "../Icon/Icon.js"; import T from "../SynapseTable/NoContentAvailable.js"; function E(p) { const [o, d] = c(0), { configs: i, rgbIndex: m, sql: s } = p, t = i[o]; return /* @__PURE__ */ r( x, { className: "FeaturedDataTabs", sx: { padding: { xs: "40px", lg: "80px" } }, children: [ i.length > 1 && /* @__PURE__ */ e("div", { className: "FeaturedDataTabs__tabs", children: i.map((a, n) => /* @__PURE__ */ e( "div", { className: `FeaturedDataTabs__tabs__tab ${n === o ? "FeaturedDataTabs__tabs__tab__selected" : ""}`, children: /* @__PURE__ */ r( "button", { className: "SRC-centerAndJustifyContent", onClick: () => d(n), children: [ a.icon && /* @__PURE__ */ e(_, { type: a.icon }), /* @__PURE__ */ e("span", { children: a.title }) ] } ) }, a.title )) }), t && /* @__PURE__ */ e(l, { children: t.plotsConfig.configs.length > 0 ? /* @__PURE__ */ r(l, { children: [ /* @__PURE__ */ e( b, { sql: s, rgbIndex: m, explorePagePath: t.explorePagePath, ...t.plotsConfig }, `${s}-${o}` ), t.explorePagePath && /* @__PURE__ */ e("div", { className: "FeaturedDataTabs__explore-all", children: /* @__PURE__ */ r( h, { variant: "contained", color: "secondary", href: t.explorePagePath, sx: (a) => ({ mb: "40px", [a.breakpoints.down("sm")]: { width: "100%" } }), children: [ "View All ", t.exploreObjectType ] } ) }) ] }) : /* @__PURE__ */ e(u, { sx: { p: 2 }, children: /* @__PURE__ */ e(T, {}) }) }) ] } ); } export { E as default }; //# sourceMappingURL=FeaturedDataTabs.js.map