fix(ui): use Modal.extend for proper Mantine v7 typing

This commit is contained in:
Thomas Camlong committed 2026-05-27 16:22:16 +02:00
1 parent 18db344ed1
commit 6461d84ec8
1 file changed
+4 -4
+4 -4
View File
@@ -1,4 +1,4 @@
import { createTheme } from "@mantine/core"; import { createTheme, Modal } from "@mantine/core";
import { primaryColor } from "./theme/colors/primary"; import { primaryColor } from "./theme/colors/primary";
import { secondaryColor } from "./theme/colors/secondary"; import { secondaryColor } from "./theme/colors/secondary";
@@ -10,13 +10,13 @@ export const theme = createTheme({
}, },
primaryColor: "primaryColor", primaryColor: "primaryColor",
components: { components: {
Modal: { Modal: Modal.extend({
vars: (_theme: unknown, props: { size?: string }) => { vars: (_theme, props) => {
if (props.size === "xxl") { if (props.size === "xxl") {
return { root: { "--modal-size": "75rem" } }; return { root: { "--modal-size": "75rem" } };
} }
return { root: {} }; return { root: {} };
}, },
}, }),
}, },
}); });