Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit 3321ac4

Browse files
committed
feat(thene): add default config settings
1 parent d077ccd commit 3321ac4

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

packages/chakra-ui-theme/src/theme/index.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ import breakpoints from './breakpoints'
1010

1111
const space = baseSizes
1212

13+
const config = {
14+
useSystemColorMode: false,
15+
initialColorMode: "light",
16+
cssVarPrefix: "chakra",
17+
}
18+
1319
const theme = {
1420
breakpoints,
1521
zIndices,
@@ -21,7 +27,8 @@ const theme = {
2127
borderWidths,
2228
sizes,
2329
shadows,
24-
space
30+
space,
31+
config
2532
}
2633

2734
export default theme

packages/chakra-ui-theme/types/index.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,12 @@ export type ComponentNames =
173173
'CTooltip' |
174174
'CVisuallyHidden'
175175

176+
export interface ThemeConfig {
177+
initialColorMode?: ColorMode
178+
useSystemColorMode?: boolean,
179+
cssVarPrefix?: string
180+
}
181+
176182
declare const theme: Theme
177183

178184
export default theme

0 commit comments

Comments
 (0)