How to customize dark mode components theming #797
Unanswered
javiersanp
asked this question in
Q&A
Replies: 1 comment 1 reply
-
You add your |
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.
-
I would like to customize the color used by components in dark mode.
Only as an example, if use a light or dark button, the dark colors are hard coded to bg-gray-*
const colorClasses = {
dark: 'text-white bg-gray-800 hover:bg-gray-900 dark:bg-gray-800 dark:hover:bg-gray-700',
light:
'text-gray-900 bg-white border border-gray-300 hover:bg-gray-100 dark:bg-gray-800 dark:text-white dark:border-gray-600 dark:hover:bg-gray-700 dark:hover:border-gray-600',
If I instead want to use bg-neutral-* classes, the only way I could figure is to pass custom props or classes to each component every time I use it.
Could you suggest me a way to do this globally?
Beta Was this translation helpful? Give feedback.
All reactions