DEV Community

Discussion on: I built a full stack serverless e-commerce site with Next.js. What I learned and how it might help you

 
kieran6roberts profile image
Kieran Roberts

Checked my code this is what I've got. Try the extendTheme function and passing resetCSS as a prop to the provider.

import { ChakraProvider, extendTheme } from "@chakra-ui/react";

const config = {
    initialColorMode: "light",
    useSystemColorMode: true
};

export const theme = extendTheme({ 
  config,
  styles: {
    global: {
      a: {
        fontSize: "sm",
      },
    },
    ... more stuff
  },
});

const MyApp = ({ Component, pageProps }: AppProps): React.ReactElement => {
  return (
      <ChakraProvider resetCSS={true} theme={theme}>
            <Component {...pageProps} />
      </ChakraProvider>
  );
};
Enter fullscreen mode Exit fullscreen mode
Thread Thread
 
nemethricsi profile image
Richard

aaaaah!! Thank you very much!!!! ✨