Nerds Publishing Monstrosities

    storybook-addon-themr

    0.0.1 • Public • Published

    Storybook Themr addon

    CircleCI npm

    Getting Started

    First, install the addon

    npm install -D storybook-addon-themr

    Add this line to your addons.js file (create this file inside your storybook config directory if needed).

    import 'storybook-addon-themr/register';

    Now add your themes to stories

    import React from 'react';
    import { storiesOf, addDecorator } from '@storybook/react';
    import { reactCSSThemr } from 'storybook-addon-themr';
     
    const themes = {
      'theme no. 1': {...theme1},
      'theme no. 2': {...theme2}
    };
     
    storiesOf('Story', module)
      .addDecorator(reactCSSThemr(themes))
      .add('components', () => (
        <Components />
      ));

    P.S. any feedback is appreciated

    Keywords

    none

    Install

    npm i storybook-addon-themr

    DownloadsWeekly Downloads

    0

    Version

    0.0.1

    License

    MIT

    Last publish

    Collaborators

    • olly12mm