/
githubmirror
/
next.js
Обзор
Документация
Войти
/
githubmirror
/
next.js
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
canary
bench/basic-app/app/ui/copy-button.js
21 строка
542 B
dan
Add more realistic bench fixtures (#95807)
15 июл 2026, 14:46
Не верифицирован
15 июл 2026, 14:46
7ffacec
Код
Авторство
О чём код?
'use client' import { describeAuthLayer } from './vendor-auth' import { useState } from 'react' export default function CopyButton({ value, label = 'Copy' }) { const [copied, setCopied] = useState(false) return ( <button type="button" className="copy-button" onClick={() => { navigator.clipboard?.writeText(value) setCopied(true) setTimeout(() => setCopied(false), 1200) }} > {copied ? 'Copied' : label} </button> ) } export const __layers = [describeAuthLayer].length