0.0.1 • Published 7 years ago

storybook-addon-themr v0.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

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