diff --git a/README.md b/README.md index c9b50a9..ea70dc6 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ Extend & Extend Theme token is described as the following section. `app/layout.tsx` ```tsx - + {children} ``` @@ -63,7 +63,7 @@ All components are wrapping of Chakra-UI components. So you can use all the `styled-system` syntax used in it. -Currently, css variables always have a prefix of `--ck`, but this will be changed so that it can be set in a future update. +Currently, css variables always have a prefix of `--ck`, this can be changed by chakra-ui `css-var-prefix` config feature. For example, colors can be used in CSS like `var(--ck-colors-red-500)`. diff --git a/src/provider/DesignProvider.tsx b/src/provider/DesignProvider.tsx index 1dbe30b..8c11f72 100644 --- a/src/provider/DesignProvider.tsx +++ b/src/provider/DesignProvider.tsx @@ -15,7 +15,8 @@ import { InitialCookiesProvider } from './InitialCookieProvider'; type Props = PropsWithChildren<{ theme?: Dict; - initialColorMode?: 'dark' | 'light'; + /** color mode of theme, default: light */ + colorMode?: 'dark' | 'light'; enableColorModeScript?: boolean; }>; @@ -23,17 +24,17 @@ const cookieKey = 'chakra-ui-color-mode'; export const DesignProvider = ({ children, theme, - initialColorMode = 'light', + colorMode = 'light', enableColorModeScript = true, }: Props) => { return ( - + {enableColorModeScript ? ( - + ) : null} {children}