Skip to content

Commit

Permalink
Merge pull request #11 from onemanfighter/amitraikwar/add-theme
Browse files Browse the repository at this point in the history
feat(): Fixing themes
  • Loading branch information
onemanfighter authored Aug 18, 2024
2 parents 189213b + 9b583f6 commit 76a2406
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/components/Theme/theme.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ThemeConfig, extendBaseTheme } from '@chakra-ui/react';
import { ThemeConfig, extendTheme } from '@chakra-ui/react';
import colors from './colors';
import { fontSize, fontWeight, lineHeight, zIndices } from './fonts';

Expand All @@ -17,6 +17,6 @@ const themeData = {
zIndices: { ...zIndices },
};

const theme = extendBaseTheme(themeData);
const theme = extendTheme(themeData);

export default theme;
9 changes: 2 additions & 7 deletions src/providers/theme/ThemeProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
import { ChakraProvider, ColorModeScript } from '@chakra-ui/react';
import { ChakraProvider } from '@chakra-ui/react';
import { theme } from '@components';
import { ThemeProviderProps } from './types';

const ThemeProvider = ({ children }: ThemeProviderProps) => {
return (
<ChakraProvider theme={theme} cssVarsRoot="body">
<ColorModeScript initialColorMode={theme.config.initialColorMode} />
{children}
</ChakraProvider>
);
return <ChakraProvider theme={theme}>{children}</ChakraProvider>;
};

export default ThemeProvider;

0 comments on commit 76a2406

Please sign in to comment.