chakra-ui-vue
chakra-ui-vue copied to clipboard
Setting default Color Mode in nuxt.config.js when using the @chakra-ui/vue module
Describe the solution you'd like
The consumer of the @chakra-ui/nuxt module should be able to set the color mode in nuxt.config.js
I'd like to pick this up.
@DominusKelvin Can you provide more context as to what is required?
@peoray basically a consumer should be able to set the default color mode for the entire app in the nuxt.config.json file.
@codebender828 also have some more thoughts on it.
@peoray @DominusKelvin
Thanks guys for taking this on. The default color mode would be best handled by the src/Chakra/index.js plugin. Since all the Nuxt module options are actually forwarded to the plugin and are handled by it, that's where it should be.
Include defaultColorMode as an option to the plugin. In the plugin you can add it as an option to the $chakra object. The CThemeProvider and CColorModeProvider components should then read it the value from this.$chakra.defaultColorMode. If its unavailable it should fallback to light mode.
@peoray I am hoping to assist on this if you need any. May the force be with you 😁
Hey @peoray @DominusKelvin ! How are you doing?
Have you made progress with this issue?
Blimey! This fell through my he cracks I guess. @peoray haven't responded on this. @codebender828 have time for us to pair on this one?
Sorry, Kelvin. Did not remember this. Since we are in the same timezone, we can schedule a time and see what happens. Let me know what you think :)
@peoray @DominusKelvin Cheers! Thanks, guys. I also agree that it might be easier for you to work on this. Let me know if you guys need some help with this. Cheers!
Sorry, Kelvin. Did not remember this. Since we are in the same timezone, we can schedule a time and see what happens. Let me know what you think :)
This would be awesome. Let's hop on a zoom call later today.
What Time?