Files
homarr/packages/ui/src/theme.ts
T
Thomas Camlong 904bef50d8 fix(ui): use inline vars resolver instead of Modal.extend
Modal.extend() is not available at module evaluation time in the
Next.js/Turbopack ESM context, causing a runtime TypeError. Define
the vars resolver as a plain object in createTheme's components key.
2026-05-14 17:00:26 +02:00

23 lines
529 B
TypeScript

import { createTheme } from "@mantine/core";
import { primaryColor } from "./theme/colors/primary";
import { secondaryColor } from "./theme/colors/secondary";
export const theme = createTheme({
colors: {
primaryColor,
secondaryColor,
},
primaryColor: "primaryColor",
components: {
Modal: {
vars: (_theme: unknown, props: { size?: string }) => {
if (props.size === "xxl") {
return { root: { "--modal-size": "75rem" } };
}
return { root: {} };
},
},
},
});