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

41 lines (40 loc) 1.25 kB
import { jsxs as c, jsx as a } from "react/jsx-runtime"; import { formatDate as t } from "../../utils/functions/DateFormatter.js"; import n from "dayjs"; import u from "../ShowMore/ShowMore.js"; function T({ id: d, name: s, description: i, type: l, toolDetailPageURL: r, date: e, url: m, ...o }) { return /* @__PURE__ */ c( "div", { ...o, className: `cardContainer FeaturedToolCard ${o.className ?? ""}`, children: [ /* @__PURE__ */ a("div", { className: "FeaturedToolCard__Type", children: /* @__PURE__ */ a("span", { className: "SRC-tag", children: l }) }), e && /* @__PURE__ */ a("div", { className: "FeaturedToolCard__Date", children: t(n(parseInt(e)), "MMMM YYYY") }), /* @__PURE__ */ a("div", { className: "FeaturedToolCard__Name", children: s }), /* @__PURE__ */ a("div", { className: "FeaturedToolCard__Description", children: /* @__PURE__ */ a(u, { summary: i }) }), /* @__PURE__ */ a( "a", { className: "FeaturedToolCard__Link", href: r ? `${r}${d}` : m, children: "View Tool" } ) ] } ); } export { T as FeaturedToolCard }; //# sourceMappingURL=FeaturedToolCard.js.map