mirror of
https://github.com/hanzo-apps/hanzo.ai.git
synced 2026-10-29 07:20:43 +00:00
/enso, /kai and /zen close on rows you can hit: the model cards, the boards, and the papers and HIPs that exist. /benchmarks lists every board in the model file and every paper in the library. /research links the HIP index, the family specifications, and the standards they are written to. Co-authored-by: Hanzo Dev <[email protected]>
28 lines
714 B
TypeScript
28 lines
714 B
TypeScript
'use client'
|
|
|
|
import { useState } from 'react'
|
|
import { Button } from '@hanzo/ui'
|
|
|
|
/** Puts a command on the clipboard. The command stays on the page either way. */
|
|
export function CopyText({ text, label, word }: { text: string; label: string; word?: string }) {
|
|
const [done, setDone] = useState(false)
|
|
return (
|
|
<Button
|
|
variant="ghost"
|
|
size="sm"
|
|
aria-label={done ? 'Copied' : label}
|
|
onClick={async () => {
|
|
try {
|
|
await navigator.clipboard.writeText(text)
|
|
setDone(true)
|
|
window.setTimeout(() => setDone(false), 2000)
|
|
} catch {
|
|
setDone(false)
|
|
}
|
|
}}
|
|
>
|
|
{done ? 'Copied' : (word ?? label)}
|
|
</Button>
|
|
)
|
|
}
|