0.0.8 • Published 4 years ago

storybook-theme-knob v0.0.8

Weekly downloads
69
License
ISC
Repository
-
Last release
4 years ago

Storybook Theme Knob

A decorator that, when applied, includes a theme knob as the first knob in the panel for all stories if used globally or for the stories outlined in each story config the decorator is used in.

Usage

The following can be applied globally or in a story config:

addDecorator(withTheme([
    {
        id: 'Theme one',
        code:`<style>${require('!css-loader!../theme1.css')}</style>`,
        default: true
    },
    {
        id: 'Theme two',
        code:`<style>${require('!css-loader!../theme2.css')}</style>`,
        default: false
    },
    {
        id: 'Theme three',
        code:`<style>${require('!css-loader!../theme3.css')}</style>`,
        default: false
    },
]))
0.0.8

4 years ago

0.0.7

4 years ago

0.0.5

4 years ago

0.0.6

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.4

4 years ago

0.0.1

4 years ago