plotly / dash-daq

Control components for Dash
MIT License
141 stars 40 forks source link

Provide a ThemeProvider instead of a DarkThemeProvider #7

Open Bachibouzouk opened 6 years ago

Bachibouzouk commented 6 years ago

I find the DarkThemeProvider name misleading as it is possible to get a light theme by setting the attribute of DarkThemeProvider theme['dark'] to False.

IMHO, it would be useful to have a ThemeProvider which could also provide a "greyed out" theme, for when components are disabled for example :)

This would make the switch from light, dark or grey out easy using a callback on a theme['name'] attribute for example

xhluca commented 6 years ago

Wanted to add that when the theme is changed, the current state of the app is reset. See this example: https://dash-daq-stepper-motor.herokuapp.com/

try changing a slider value, then change the theme; it will reset.

Bachibouzouk commented 6 years ago

The DarkThemeProvider doesn't have an id, so one technically cannot write a callback with it