cloudoperators / juno

Monorepo for the Juno microfrontend framework, microfrontend apps, design system and component library
Apache License 2.0
2 stars 0 forks source link

feat(ui): Theme toggle component #66

Open edda opened 3 weeks ago

edda commented 3 weeks ago

Create a theme toggle component.

Features:

franzheidl commented 3 days ago

Currently, the classes on the app body are called theme-light and theme-dark respectively.

StyleProvider expects a theme prop that it will remap to themeClassName which will be used as-is if supplied or default to theme-dark (while at it, we could use a default-prop, currently this is defaulting "manually").

When introducing a useTheme hook, all the logic deciding about the theme should go there. StyleProvider should only recevie a theme prop, and attach the respective styles and className.

We should revisit naming of the props and classNames representing a theme: