-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix MantineThemeOverride #6836
Comments
What kind of module augmentation does not work? Can you please send a link to the documentation that describes it? I've checked |
This isn’t something that needs a link to documentation or any reproduction steps, as it’s a basic matter of how Typescript handles module augmentation and I expected you to grasp the problem right away just from looking at the imports. Module augmentation only applies when the type is imported from the original module – in this case The override for To add injury to insult, |
|
I understand now. In that case it seems you don't have a full, flexible theme overriding implementation in place. Allowing only On another note, a secondary color should be able to live in People who might like keeping custom properties neatly separated from the base theme ones, could always extend the theme themselves to include As for me, I've patched your code to have |
Closing the issue without any feedback on whether this will be considered doesn't feel very considerate. Could you provide some clarity on whether flexible theme overrides will be addressed in the future? |
GitHub issues are used to report bugs with the library. This is not a bug with the library, you've made a wrong assumption about the meaning of the |
MantineThemeOverride is curently broken because of how imports are being made in your code. You're using relative imports of MantineThemeOverride instead of importing from
@mantine/code
, which means module augmentation on our end won't be applied.Also some types, like CSSVariablesResolver, use MantineTheme incorrectly instead of MantineThemeOverride:
Also
create-theme.d.ts
needs to be fixed:Finally,
useMantineTheme
also needs changing.The text was updated successfully, but these errors were encountered: