It seems like, currently, this hook only works with global styles sheets but as the codebase grows, multiple stylesheets become a necessity. This is particularly relevant with frameworks like Next.js where the file structure advises different stylesheets for different modules, separate from the global stylesheet.
I think it'll be really valuable if this worked with all stylesheets and not just global. Since the useDarkMode function looks for classes name .dark-mode or .light-mode (or other user-defined names) could this hook be used to also implemented these classes present in other stylesheets?
[FEATURE REQUEST]
It seems like, currently, this hook only works with global styles sheets but as the codebase grows, multiple stylesheets become a necessity. This is particularly relevant with frameworks like Next.js where the file structure advises different stylesheets for different modules, separate from the global stylesheet.
I think it'll be really valuable if this worked with all stylesheets and not just
global
. Since theuseDarkMode
function looks for classes name.dark-mode
or.light-mode
(or other user-defined names) could this hook be used to also implemented these classes present in other stylesheets?