-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade mantine monorepo to v7 (#104)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
- Loading branch information
1 parent
2291290
commit 250ba24
Showing
114 changed files
with
1,400 additions
and
1,543 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module.exports = { | ||
plugins: { | ||
'postcss-nested': {}, | ||
'postcss-preset-mantine': {}, | ||
'postcss-simple-vars': { | ||
variables: { | ||
'mantine-breakpoint-xs': '36em', | ||
'mantine-breakpoint-sm': '48em', | ||
'mantine-breakpoint-md': '62em', | ||
'mantine-breakpoint-lg': '75em', | ||
'mantine-breakpoint-xl': '88em', | ||
}, | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,16 @@ | ||
import { | ||
ColorScheme, | ||
ColorSchemeProvider, | ||
MantineProvider, | ||
} from "@mantine/core" | ||
import { NotificationsProvider } from "@mantine/notifications" | ||
import { ReactElement, useState } from "react" | ||
import { MantineProvider } from "@mantine/core" | ||
import { Notifications } from "@mantine/notifications" | ||
import { ReactElement } from "react" | ||
import { theme } from "../theme" | ||
|
||
export function ThemeProvider({ children }: { children: ReactElement }) { | ||
const [colorScheme, setColorScheme] = useState<ColorScheme>("light") | ||
const toggleColorScheme = (value?: ColorScheme) => | ||
setColorScheme(value || (colorScheme === "dark" ? "light" : "dark")) | ||
// withGlobalStyles | ||
// withNormalizeCSS | ||
|
||
return ( | ||
<NotificationsProvider> | ||
<ColorSchemeProvider | ||
colorScheme={colorScheme} | ||
toggleColorScheme={toggleColorScheme} | ||
> | ||
<MantineProvider | ||
theme={{ ...theme, colorScheme }} | ||
withGlobalStyles | ||
withNormalizeCSS | ||
> | ||
{children} | ||
</MantineProvider> | ||
</ColorSchemeProvider> | ||
</NotificationsProvider> | ||
<MantineProvider theme={theme}> | ||
<Notifications /> | ||
{children} | ||
</MantineProvider> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { useComputedColorScheme } from "@mantine/core"; | ||
|
||
export function useColorScheme(): "light" | "dark" { | ||
return useComputedColorScheme('light', { getInitialValueInEffect: true }) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { User } from "../../types"; | ||
|
||
export const getAssignableUsersByProject = (projectIdOrKey: string): Promise<User[]> => | ||
window.provider.getAssignableUsersByProject(projectIdOrKey) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.