Skip to content

Commit

Permalink
Merge pull request #74 from sei-protocol/features/mantine-general-cle…
Browse files Browse the repository at this point in the history
…anup
  • Loading branch information
codebycarson authored Jun 6, 2024
2 parents b4673f5 + 78af00d commit ce9d752
Show file tree
Hide file tree
Showing 40 changed files with 597 additions and 18,372 deletions.
29 changes: 29 additions & 0 deletions components/MantineWrapper.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import {createTheme, MantineProvider} from "@mantine/core";
import {useTheme} from "next-themes";
import {useMemo} from "react";

const mantineThemeOverride = createTheme({
autoContrast: true
});

export const MantineWrapper = ({ children }) => {
const { theme } = useTheme()

const mantineTheme = useMemo(() => {
switch (theme) {
case "dark":
return "dark";
case "light":
return "light";
default:
return undefined;

}
}, [theme]);

return (
<MantineProvider theme={mantineThemeOverride} forceColorScheme={mantineTheme}>
{children}
</MantineProvider>
)
}
Loading

0 comments on commit ce9d752

Please sign in to comment.