mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-21 15:29:27 +00:00
default to system color mode
This commit is contained in:
parent
e2858c04dc
commit
629ed7c885
3 changed files with 15 additions and 1 deletions
12
src/theme/foundations/config.ts
Normal file
12
src/theme/foundations/config.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
import { type ThemeConfig } from '@chakra-ui/react';
|
||||||
|
/**
|
||||||
|
* https://chakra-ui.com/docs/styled-system/color-mode
|
||||||
|
* initialColorMode: 'system' —— Will default to users system color mode
|
||||||
|
* useSystemColorMode=true —— Color mode will change if user changes their system color mode
|
||||||
|
* Can be overridden with toggle on site and will persist after refresh
|
||||||
|
* Choice is stored/managed with local storage
|
||||||
|
*/
|
||||||
|
export const config: ThemeConfig = {
|
||||||
|
initialColorMode: 'system',
|
||||||
|
useSystemColorMode: true
|
||||||
|
};
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
export * from './colors';
|
export * from './colors';
|
||||||
|
export * from './config';
|
||||||
export * from './shadows';
|
export * from './shadows';
|
||||||
export * from './sizes';
|
export * from './sizes';
|
||||||
export * from './textStyles';
|
export * from './textStyles';
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
import { extendTheme } from '@chakra-ui/react';
|
import { extendTheme } from '@chakra-ui/react';
|
||||||
|
|
||||||
import { colors, shadows, sizes, textStyles } from './foundations';
|
import { config, colors, shadows, sizes, textStyles } from './foundations';
|
||||||
import { Button, Link } from './components';
|
import { Button, Link } from './components';
|
||||||
|
|
||||||
const overrides = {
|
const overrides = {
|
||||||
|
config,
|
||||||
colors,
|
colors,
|
||||||
components: {
|
components: {
|
||||||
Button,
|
Button,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue