UNPKG

@stanfordspezi/spezi-web-design-system

Version:

Stanford Biodesign Digital Health Spezi Web Design System

30 lines (29 loc) 858 B
import { jsxs as s, jsx as t } from "react/jsx-runtime"; import { c } from "./index-2NvaPZWc.mjs"; import { c as p } from "./misc-CHmrAmhc.mjs"; import i from "./clipboard-copy-BhSsZYw7.mjs"; const f = ({ children: a, className: e, value: r }) => { const o = r ?? String(a); return /* @__PURE__ */ s( "button", { "data-slot": "copy-text", type: "button", className: c( "interactive-opacity flex w-full items-center gap-2", e ), onClick: async () => { await p(o); }, "aria-label": `Copy "${o}" to clipboard`, children: [ /* @__PURE__ */ t("span", { className: "truncate", children: a }), /* @__PURE__ */ t("span", { className: "flex", children: /* @__PURE__ */ t(i, { className: "text-muted-foreground size-5" }) }) ] } ); }; export { f as C };