snaha-net / diete.design

https://diete.design
MIT License
0 stars 0 forks source link

Add mode to components to force using color scheme #338

Open agazso opened 1 month ago

agazso commented 1 month ago

Sometimes a design of a website contains sections which have a background that is always dark, regardless of the color scheme chosen by the user. The code section of the Diete website is one example for this.

If you put (for example) a button on it, the colors of the button component will follow the color scheme chosen by the user and if the user has a light color scheme chosen the button won't be visible or readable.

It would be good to have an extra prop (called mode) which could be either light or dark and its default value would follow the system color scheme. With that it would be possible to override the system color scheme for a certain component and put components on always dark backgrounds, regardless of the system color scheme.

Similar previous issue and solution: https://github.com/snaha-net/diete.design/pull/323