abereghici / remix-themes

An abstraction for themes in your Remix app.
https://www.npmjs.com/package/remix-themes
MIT License
123 stars 14 forks source link

Allow a 'System' setting as an option #33

Closed abereghici closed 4 months ago

abereghici commented 9 months ago

Discussed in https://github.com/abereghici/remix-themes/discussions/21

Originally posted by **micotodev** March 29, 2023 A lot of websites have Light/Dark and then a 'System' preference (see [Tailwind CSS website](https://tailwindcss.com/)). Currently, if the user has chosen a specific colour theme on the website, it will be changed irrespective of their choice when they change their system preference. Maybe having an extra flag of `isSystemPreference: boolean` and only set the event listener when that is true would be the best option. We could still set the Theme enum (but with the ability to check for this flag when creating a dropdown of the three values).
glassworks-projects commented 4 months ago

+1 :)

abereghici commented 4 months ago

https://github.com/abereghici/remix-themes/releases/tag/v1.4.0