fix(ui): revert Modal.extend, not available at runtime

This commit is contained in:
Thomas Camlong committed 2026-05-27 16:23:06 +02:00
1 parent 6461d84ec8
commit 1b19248262
1 file changed
+7 -5
+7 -5
View File
@@ -1,8 +1,10 @@
import { createTheme, Modal } from "@mantine/core"; import { createTheme } 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";
const XXL_MODAL_SIZE = "75rem";
export const theme = createTheme({ export const theme = createTheme({
colors: { colors: {
primaryColor, primaryColor,
@@ -10,13 +12,13 @@ export const theme = createTheme({
}, },
primaryColor: "primaryColor", primaryColor: "primaryColor",
components: { components: {
Modal: Modal.extend({ Modal: {
vars: (_theme, props) => { vars: (_theme: unknown, props: { size?: string }) => {
if (props.size === "xxl") { if (props.size === "xxl") {
return { root: { "--modal-size": "75rem" } }; return { root: { "--modal-size": XXL_MODAL_SIZE } };
} }
return { root: {} }; return { root: {} };
}, },
}), },
}, },
}); });