UNPKG

@anoki/fse-ui

Version:

FSE UI components library

51 lines (50 loc) 2.2 kB
import { j as r } from "./index.es180.js"; import './components/ui/CardFile/CardFile.css';/* empty css */ import { Button as o } from "./index.es25.js"; import { ArrowLink as n } from "./index.es35.js"; import { clsx as a } from "./index.es182.js"; import { File as d } from "./index.es139.js"; import { Download as x } from "./index.es144.js"; import { ExternalLink as c } from "./index.es114.js"; var m = /* @__PURE__ */ ((s) => (s.DOWNLOAD = "download", s.GOTO = "goto", s.EXTERNAL = "external", s))(m || {}); function v({ title: s, description: t, issued_at: l, file: i, action: e }) { return /* @__PURE__ */ r.jsxs("div", { className: "card-file shadow rounded h-100 w-100 bg-white", children: [ /* @__PURE__ */ r.jsxs("div", { className: "top-container p-x16", children: [ /* @__PURE__ */ r.jsx("div", { className: "icon-wrapper", children: /* @__PURE__ */ r.jsx(d, { height: 27, width: 27 }) }), /* @__PURE__ */ r.jsxs("div", { className: "content-container", children: [ /* @__PURE__ */ r.jsxs("div", { children: [ /* @__PURE__ */ r.jsx("h4", { className: "card-file-title text-primary mt-x8", children: s }), i && /* @__PURE__ */ r.jsxs("p", { className: "file-type", children: [ `${i.type} | `, i.size ] }) ] }), !!t && /* @__PURE__ */ r.jsx("p", { className: "description text-secondary", children: t }), l && /* @__PURE__ */ r.jsx("p", { className: "description text-secondary", children: l }) ] }) ] }), /* @__PURE__ */ r.jsx("div", { className: a("card-file-footer py-x12 px-x16", e.type), children: e.type === "download" ? /* @__PURE__ */ r.jsxs( o, { className: "bg-transparent download-button", asLink: "a", href: e.link.link, children: [ /* @__PURE__ */ r.jsx(x, {}), e.link.title ] } ) : e.type === "goto" ? /* @__PURE__ */ r.jsx(n, { href: e.link.link, children: e.link.title }) : /* @__PURE__ */ r.jsx(c, { color: "primary", height: 32, width: 32 }) }) ] }); } export { v as CardFile, m as CardFileActionTypeEnum }; //# sourceMappingURL=index.es92.js.map