fix(ui): revert Modal.extend, not available at runtime
This commit is contained in:
1 file changed
+7
-5
@@ -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: {} };
|
||||||
},
|
},
|
||||||
}),
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
Reference in new issue
Block a user