主題選擇器

Storybook 工具,用於在主題之間切換。

在 Github 上檢視

CSS 樣式表選擇器


輕鬆新增額外的樣式表以在您的故事之間切換。

安裝


npm i css-stylesheet-switcher

用法


import { addParameters } from '@storybook/react';

addParameters({
    themeStylesheetSelector: {
        stylesheets: [
            {
                id: 'Theme 1',
                title: 'Theme 1',
                url: 'css/someCss1.css'
            },
            {
                id: 'Theme 2',
                title: 'Theme 2',
                url: 'css/someCss2.css'
            }
        ]
    }
});