@stanfordspezi/spezi-web-design-system
Version:
Stanford Biodesign Digital Health Spezi Web Design System
7 lines (6 loc) • 1.1 kB
JavaScript
;const e=require("react/jsx-runtime"),o=require("./index-DwV9MiDB.js"),r=require("./misc-DD8jgyt3.js"),i=require("./createLucideIcon-DpotSgUx.js");/**
* @license lucide-react v0.488.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const n=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]],p=i.createLucideIcon("clipboard-copy",n),d=({children:t,className:c,value:s})=>{const a=s??String(t);return e.jsxs("button",{type:"button",className:o.cn("interactive-opacity flex w-full items-center gap-2",c),onClick:async()=>{await r.copyToClipboard(a)},"aria-label":`Copy "${a}" to clipboard`,children:[e.jsx("span",{className:"truncate",children:t}),e.jsx("span",{className:"flex",children:e.jsx(p,{className:"text-muted-foreground size-5"})})]})};exports.CopyText=d;