/
githubmirror
/
next.js
Обзор
Документация
Войти
/
githubmirror
/
next.js
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
canary
bench/basic-app/app/ui/theme-toggle.js
24 строки
603 B
dan
Add more realistic bench fixtures (#95807)
15 июл 2026, 14:46
Не верифицирован
15 июл 2026, 14:46
7ffacec
Код
Авторство
О чём код?
'use client' import { describeUtils } from './vendor-util' import { useState } from 'react' export default function ThemeToggle() { const [theme, setTheme] = useState('system') const next = theme === 'system' ? 'dark' : theme === 'dark' ? 'light' : 'system' return ( <button type="button" className="theme-toggle" title={'Theme: ' + theme} onClick={() => setTheme(next)} > {theme === 'dark' ? '\u263E' : theme === 'light' ? '\u2600\uFE0E' : '\u25D1'} </button> ) } export const __layers = [describeUtils].length