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

181 lines (180 loc) 4.98 kB
import { jsxs as n, jsx as e } from "react/jsx-runtime"; import { EastTwoTone as g } from "@mui/icons-material"; import { Card as y, Box as r, Chip as w, Typography as i, Link as u } from "@mui/material"; import v from "../ImageFromSynapseTable.js"; const p = { textOverflow: "ellipsis", overflow: "hidden", display: "-webkit-box", "-webkit-box-orient": "vertical" // height: YOUR HEIGHT, // '-webkit-line-clamp': NUMBER OF LINES, }; function C({ sourceTable: a, name: d, description: s, contributors: h, keywords: t, imageFileId: x, individuals: c, size: m, sizeUnit: f, link: b }) { const l = t ? JSON.parse(t) : []; return /* @__PURE__ */ n( y, { sx: { display: "flex", flexDirection: "column", rowGap: "30px" }, children: [ /* @__PURE__ */ n( r, { sx: { display: "flex", flexDirection: "column", rowGap: "15px", p: "30px 30px 0px 30px" }, children: [ /* @__PURE__ */ e( r, { sx: { display: "flex", flexWrap: "wrap", rowGap: "5px", minHeight: "70px", overflow: "hidden" }, children: l && l.map((o) => /* @__PURE__ */ e( w, { sx: { mr: "5px", color: "secondary.600", backgroundColor: "secondary.100", borderWidth: "0px" }, label: o }, o )) } ), /* @__PURE__ */ e( i, { variant: "headline3", sx: { fontSize: "24px", fontWeight: 600, lineHeight: "32px", ...p, height: "70px", "-webkit-line-clamp": "2" }, children: d } ) ] } ), x && /* @__PURE__ */ e(r, { sx: { p: "30px", backgroundColor: "primary.100" }, children: /* @__PURE__ */ e( v, { tableId: a, fileHandleId: x } ) }), /* @__PURE__ */ n( r, { sx: { display: "flex", flexDirection: "column", p: "0px 30px 30px 30px" }, children: [ /* @__PURE__ */ e( i, { variant: "body1", sx: { fontSize: "16px", fontWeight: 400, lineHeight: "24px", mb: "20px", ...p, height: "120px", "-webkit-line-clamp": "5" }, children: s } ), /* @__PURE__ */ e( i, { variant: "body1", sx: { fontSize: "14px", fontWeight: 700, lineHeight: "20px" }, children: "Dimensions" } ), /* @__PURE__ */ n( i, { variant: "body1", sx: { mb: "20px", ...p, height: "24px", "-webkit-line-clamp": "1" }, children: [ c, " individuals, ", m, f ] } ), /* @__PURE__ */ e( i, { variant: "body1", sx: { fontSize: "14px", fontWeight: 700, lineHeight: "20px" }, children: "Contributors" } ), /* @__PURE__ */ e( i, { variant: "body1", sx: { ...p, height: "48px", "-webkit-line-clamp": "2" }, children: h } ), /* @__PURE__ */ e(r, { sx: { mt: "32px" }, children: /* @__PURE__ */ n(u, { href: b, target: "_blank", children: [ "Explore dataset", /* @__PURE__ */ e(g, { sx: { mb: "-8px", ml: "6px" } }) ] }) }) ] } ) ] } ); } export { C as SynapseFeaturedDatasetItem }; //# sourceMappingURL=SynapseFeaturedDatasetItem.js.map