MCPcopy Create free account
hub / github.com/davidhu2000/react-spinners / copy

Function copy

examples/useCopied.ts:7–11  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

5 const [copied, setCopied] = React.useState(false);
6
7 async function copy(text: string) {
8 await navigator.clipboard.writeText(text);
9 setCopied(true);
10 setTimeout(() => setCopied(false), 1600);
11 }
12
13 return [copied, copy];
14}

Callers 2

InstallCommandFunction · 0.85
SpinnerCardFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected