パッケージの詳細

storybook-addon-theme-changer

kwatanwa171.2kMIT0.2.2

A Storybook addon for switching different themes (ex. daisyUI etc.)

storybook-addons, storybook, theme, dark-theme

readme

Storybook Addon Theme Changer

A simple addon for changing theme on Storybook. Inspired by theme-change

Animation

This addon just controls themes (for example, light and dark), just adding data-theme attribute to the html tag.

It works nicely with UI libraries such as daisyUI.

Support Storybook 8

Getting Started

Add this addon to the .storybook/main.js (main.ts) file.

module.exports = {
  ...
 addons: [
     // your addons here
     "storybook-addon-theme-changer"
  ],
};

Add your themes to the .storybook/preview.js (preview.ts) file

...
export const globalTypes = {
 themes: {
   defaultValue: [
     "light",
     "dark",
     ...
   ],
 },

or

...
export const globals = {
    themes: [
     "light",
     "dark",
     ...
    ],
},

更新履歴

v0.2.2 (Sun Apr 28 2024)

🐛 Bug Fix

Authors: 1


v0.2.1 (Sat Apr 27 2024)

🐛 Bug Fix

Authors: 1


v0.2.0 (Sat Apr 27 2024)

🚀 Enhancement

🐛 Bug Fix

⚠️ Pushed to main

Authors: 1


v0.1.2 (Wed May 11 2022)

🐛 Bug Fix

Authors: 1


v0.1.1 (Wed May 11 2022)

🐛 Bug Fix

Authors: 1


v0.1.0 (Wed May 11 2022)

🚀 Enhancement

⚠️ Pushed to main

Authors: 1