hipstersmoothie / storybook-dark-mode

A storybook addon that lets your users toggle between dark and light mode.
MIT License
429 stars 56 forks source link

Sun/Moon button do not appear with Storybook/html #184

Closed tchoutri closed 2 years ago

tchoutri commented 2 years ago

I am running Storybook 6.4.22 for Html and "storybook-dark-mode": "^1.1.0"

I have the following settings enabled:

// preview.js
  darkMode: {           
    current: "dark",    
    classTarget: "html",
    darkClass: "dark",  
    stylePreview: true                   
  }                    
// main.js
module.exports = {                            
  "stories": [                                
    "../stories/**/*.stories.mdx",            
    "../stories/**/*.stories.@(js|jsx|ts|tsx)"
  ],                                          
  "addons": [                                 
    "@storybook/addon-links",                 
    "@storybook/addon-essentials",            
    "@storybook/addon-storysource",           
    "@pbutlewski/storybook-html",             
    "storybook-dark-mode"                     
  ],                                          
  "framework": "@storybook/html"              
}                                                                    

But the button doesn't appear in the tool bar:

Screenshot 2022-05-17 at 21-13-27 Category - Category Card ⋅ Storybook


How can I debug this?

tchoutri commented 2 years ago

Okay I'd like to amend what I just said: Upon the fiftieth or so restart, it was finally taken into account. :)