Expose theme to components #2414
EXio4
started this conversation in
Feature Requests & Ideas
Replies: 1 comment 1 reply
-
Hey @EXio4 — you can Boom! This definitely needs to be documented though. It should go in the React Hooks page: Those docs are here: Are you interested in making a PR for adding this? That would be huge! Otherwise we can get to it eventually. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
We've been using payload and we're in the process of integrating custom routes for extra functionality, to get the style right - we need to know if we're on dark or light mode - and there seems to be no way to access that from the documentation
According to abebde6 a hook
useTheme
should be exposed, but it is only exposed onutilities.js
, not .ts? and it's not generally clear what is going onVery much appreciated if we have a helper for this, as right now we're reading local storage & reimplementing the logic from payload on our side to know which theme we should use
Beta Was this translation helpful? Give feedback.
All reactions