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 { secondaryColor } from "./theme/colors/secondary";
const XXL_MODAL_SIZE = "75rem";
export const theme = createTheme({
colors: {
primaryColor,
@@ -10,13 +12,13 @@ export const theme = createTheme({
},
primaryColor: "primaryColor",
components: {
Modal: Modal.extend({
vars: (_theme, props) => {
Modal: {
vars: (_theme: unknown, props: { size?: string }) => {
if (props.size === "xxl") {
return { root: { "--modal-size": "75rem" } };
return { root: { "--modal-size": XXL_MODAL_SIZE } };
}
return { root: {} };
},
}),
},
},
});