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

40 lines (39 loc) 1.09 kB
import { jsxs as s, Fragment as m, jsx as o } from "react/jsx-runtime"; import { ReactComponent as d } from "../../assets/icons/DoubleQuotes.svg.js"; import { Typography as p } from "@mui/material"; import { useState as u } from "react"; import C from "../GenericCard/GenericCardActionButton.js"; import { CitationPopoverContent as f } from "./CitationPopoverContent.js"; function j(t) { const [n, e] = u(null), i = (c) => { e(c.currentTarget); }, a = () => { e(null); }, r = !!n, l = r ? "cite-as-popover" : void 0; return /* @__PURE__ */ s(m, { children: [ t.doi && /* @__PURE__ */ o( C, { onClick: i, variant: "outlined", startIcon: /* @__PURE__ */ o(d, {}), sx: t.buttonSx, children: /* @__PURE__ */ o(p, { variant: "label", sx: { lineHeight: "20px" }, children: "Cite As" }) } ), /* @__PURE__ */ o( f, { ...t, anchorEl: n, open: r, id: l, onClose: a } ) ] }); } export { j as default }; //# sourceMappingURL=CitationPopover.js.map