Nationwide Polamorous Matrimony

    @akadop/storybook-sc-themes
    TypeScript icon, indicating that this package has built-in type declarations

    1.2.0 • Public • Published

    npm version build status codecov

    Notice

    Only support storybook 4 and newer

    Installation

    yarn add storybook-addon-styled-component-theme --dev

    Add to .storybook/addons.js

    import 'storybook-addon-styled-component-theme/dist/src/register'; // v1.1.0^
    
    import 'storybook-addon-styled-component-theme/dist/register'; // v1.0.7

    addDecorator to .storybook/config.js

    import {addDecorator} from '@storybook/react';
    import {withThemesProvider} from 'storybook-addon-styled-component-theme';
    
    const themes = [theme1, theme2];
    addDecorator(withThemesProvider(themes));

    or

    addDecorator to stories

    import {withThemesProvider} from 'storybook-addon-styled-component-theme';
    
    const themes = [theme1, theme2];
    
    storiesOf("demo", module)
      .addDecorator(withThemesProvider(themes))
      .add("demo div", () => <div>DEMO</div>);

    Remind

    Make sure every theme with name property

    Contributing

    yarn

    yarn build:watch

    yarn serve

    Install

    npm i @akadop/storybook-sc-themes

    DownloadsWeekly Downloads

    3

    Version

    1.2.0

    License

    MIT

    Unpacked Size

    19.8 kB

    Total Files

    22

    Last publish

    Collaborators