chakra-ui-vue icon indicating copy to clipboard operation
chakra-ui-vue copied to clipboard

Setting default Color Mode in nuxt.config.js when using the @chakra-ui/vue module

Open DominusKelvin opened this issue 5 years ago • 11 comments

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

DominusKelvin avatar May 17 '20 19:05 DominusKelvin

I'd like to pick this up.

@DominusKelvin Can you provide more context as to what is required?

peoray avatar May 20 '20 17:05 peoray

@peoray basically a consumer should be able to set the default color mode for the entire app in the nuxt.config.json file.

DominusKelvin avatar May 20 '20 18:05 DominusKelvin

@codebender828 also have some more thoughts on it.

DominusKelvin avatar May 20 '20 18:05 DominusKelvin

@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.

codebender828 avatar May 21 '20 16:05 codebender828

@peoray I am hoping to assist on this if you need any. May the force be with you 😁

DominusKelvin avatar May 21 '20 16:05 DominusKelvin

Hey @peoray @DominusKelvin ! How are you doing?

Have you made progress with this issue?

codebender828 avatar Jul 18 '20 01:07 codebender828

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?

DominusKelvin avatar Jul 18 '20 06:07 DominusKelvin

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 avatar Jul 18 '20 09:07 peoray

@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!

codebender828 avatar Jul 18 '20 09:07 codebender828

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.

DominusKelvin avatar Jul 18 '20 11:07 DominusKelvin

What Time?

peoray avatar Jul 18 '20 11:07 peoray