-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathChakraWrapper.js
More file actions
33 lines (29 loc) · 928 Bytes
/
ChakraWrapper.js
File metadata and controls
33 lines (29 loc) · 928 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
"use client";
import { ChakraProvider, extendTheme, useColorModeValue } from '@chakra-ui/react';
import { mode } from '@chakra-ui/theme-tools';
import { Montserrat } from 'next/font/google';
import { cache } from '@emotion/react';
import { useServerInsertedHTML } from 'next/navigation';
const montserrat = Montserrat({ subsets: ['latin'], weight: ['400', '500', '600'] });
// Configuração de tema
const theme = extendTheme({
fonts: {
body: montserrat.style.fontFamily,
heading: montserrat.style.fontFamily,
},
styles: {
global: (props) => ({
body: {
bg: mode('white', 'gray.800')(props),
color: mode('gray.800', 'white')(props),
},
}),
},
config: {
initialColorMode: 'light',
useSystemColorMode: false,
},
});
export function ChakraWrapper({ children }) {
return <ChakraProvider theme={theme}>{children}</ChakraProvider>;
}