mirror of
https://github.com/rocky-linux/peridot.git
synced 2024-12-20 17:58:29 +00:00
Add browser level dark color scheme
This commit is contained in:
parent
b6d94ecdc4
commit
c6e8688dc0
@ -30,12 +30,23 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
import { extendTheme, type ThemeConfig } from '@chakra-ui/react';
|
||||
import { extendTheme, type Theme, type ThemeConfig } from '@chakra-ui/react';
|
||||
|
||||
const config: ThemeConfig = {
|
||||
initialColorMode: 'system',
|
||||
};
|
||||
|
||||
const theme = extendTheme({ config });
|
||||
const styles: Theme['styles'] = {
|
||||
global: (props) => ({
|
||||
':root': {
|
||||
colorScheme: props.colorMode,
|
||||
},
|
||||
}),
|
||||
};
|
||||
|
||||
const theme = extendTheme({
|
||||
config,
|
||||
styles,
|
||||
});
|
||||
|
||||
export default theme;
|
||||
|
Loading…
Reference in New Issue
Block a user