You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm only asking this because I'm having trouble setting a proper color mode system, I wish the theme-ui approach is supported because it doesn't seem so, by that I mean having :
The only downside I have with this workaround is that let's say I'm making my sx styles object external, then I won't be able to use hooks inside it, so I will have to read the color mode value directly from the localStorage to decide which color mode to use.
I hope someone clarify this topic for me, any tips are appreciated, thanks for your time.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm only asking this because I'm having trouble setting a proper color mode system, I wish the theme-ui approach is supported because it doesn't seem so, by that I mean having :
A workaround I have as of now is by creating a custom hook that returns a helper function and wrapping the color name around it.
Usage :
The only downside I have with this workaround is that let's say I'm making my
sx
styles object external, then I won't be able to use hooks inside it, so I will have to read the color mode value directly from thelocalStorage
to decide which color mode to use.I hope someone clarify this topic for me, any tips are appreciated, thanks for your time.
Beta Was this translation helpful? Give feedback.
All reactions