/
githubmirror
/
styled-components
Обзор
Документация
Войти
/
githubmirror
/
styled-components
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/sandbox/app/lib/theme.ts
16 строк
511 B
Evan Jacobs
chore(bench/sandbox): ios-benchmark, perf suites, and sandbox updates
19 май 2026, 06:53
19 май 2026, 06:53
96f3bdf
Код
Авторство
О чём код?
import { createTheme } from 'styled-components'; import { themes } from './test-themes'; /** * Theme contract - generates CSS variable accessors from the default (light) theme. * * Usage in RSC files: * color: ${theme.colors.primary}; * // → "var(--sc-colors-primary, #0070f3)" * * The GlobalStyle component emits :root CSS vars from ThemeProvider context, * so switching themes (light → dark) updates the vars automatically. */ const theme = createTheme(themes.light); export default theme;