default to system color mode

pull/26459/head^2
Paul Wackerow 2 years ago
parent e2858c04dc
commit 629ed7c885
No known key found for this signature in database
GPG Key ID: BB63E296FE9CAB8D
  1. 12
      src/theme/foundations/config.ts
  2. 1
      src/theme/foundations/index.ts
  3. 3
      src/theme/index.ts

@ -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 './config';
export * from './shadows';
export * from './sizes';
export * from './textStyles';

@ -1,9 +1,10 @@
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';
const overrides = {
config,
colors,
components: {
Button,

Loading…
Cancel
Save