This repository has been archived by the owner on Jan 23, 2024. It is now read-only.
Using semantic tokens instead of colorScheme=
prop with <Alert>
#858
Unanswered
richardgill
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Our designer has defined semantic tokens for lightmode and darkmode. We're loosely following Primer.
For simple components e.g.
Badge
andTooltip
we were able to use the theme and then wrapped the Chakra component.Here is an example for Badge:
But this approach does not work well for
<Alert>
,<AlertTitle>
etc... because they fundamentally usecolorScheme
. But we'd prefer to be more precise which specific semantic tokens we've hand picked.Because Alert uses useContext internally this seems tricky. Is there a good way to achieve this with Chakra?
Thanks for a great library!
Beta Was this translation helpful? Give feedback.
All reactions