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
Option to remove [data-theme]
from being added
#367
Comments
You're right about the theme not being updated when calling Regarding the data-theme presence, can you not just override your tailwind theme css, like the docs website is doing ? (https://cal-heatmap.com/assets/css/styles.a42314ed.css) |
I can override it, it's just extra work. However, I guess it's not entirely necessary if the updating for the theme is fixed |
In case anyone else comes across this and didn't understand the approach above in the context of React: If you are trying to dynamically adjust the theme when a user toggles dark/light mode on your page, you can do this in a non-standard-react way.
|
Considering the fact that repainting (by calling
paint()
again) doesn't update the theme (which is an issue in and of itself),I would like an option that does not set the
data-theme
attribute at all so that it can be determined by the Tailwind theme provider what styles to apply to the heatmap.For now, I have to use this workaround:
).then(() => (cal.current as any).calendarPainter.root?.attr('data-theme', null))
The text was updated successfully, but these errors were encountered: