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
Pass the current color mode to functions used in sx
#2065
Labels
enhancement
New feature or request
Comments
Note that we also have a simpler |
Aren't all functions dependent on colors unsafe in SSR? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
I wouldn’t say it’s a problem, but something that could be improved.
Describe the solution you'd like
I would like to be able to do this:
Describe alternatives you've considered
I know I can get the current color mode with the
useThemeUI
hook, but the above is terser and nicer in some cases. For instance, if I want to extract the function above for reuse, it would be easy to do:vs what I have to do at the moment:
Additional context
I am not sure if it’s possible/easy to add a second argument to the function. Perhaps instead it could be added as a property on the
theme
?Thank you very much for your consideration!
The text was updated successfully, but these errors were encountered: