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

48 lines (47 loc) 1.48 kB
import { jsx as r, Fragment as a, jsxs as s } from "react/jsx-runtime"; import { Button as c, List as p, ListItem as d, Typography as m, Link as h } from "@mui/material"; import { sanitize as g } from "../../../../utils/functions/SanitizeHtmlUtils.js"; import { DialogBase as u } from "../../../DialogBase.js"; const C = ({ open: i, onClose: e, citations: n, title: o = "Cited by" }) => /* @__PURE__ */ r( u, { title: o, onCancel: () => { e(); }, open: i, content: /* @__PURE__ */ r(p, { children: n.map((t) => { const l = t.title ?? t.doi; return /* @__PURE__ */ r(d, { alignItems: "flex-start", children: /* @__PURE__ */ s(m, { children: [ /* @__PURE__ */ r( h, { href: `https://doi.org/${t.doi}`, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ r( "span", { dangerouslySetInnerHTML: { __html: g(l) } } ) } ), /* @__PURE__ */ r("br", {}), t.containerTitle ? `${t.containerTitle} · ` : "", t.publisher ? `${t.publisher} · ` : "", t.publicationYear ?? "" ] }) }, t.id); }) }), actions: /* @__PURE__ */ r(a, { children: /* @__PURE__ */ r(c, { variant: "outlined", onClick: () => e(), children: "Close" }) }) } ); export { C as CitationsDialog }; //# sourceMappingURL=CitationsDialog.js.map