1.1.4 • Published 5 years ago

storybook-styled-components v1.1.4

Weekly downloads
13,613
License
ISC
Repository
-
Last release
5 years ago

storybook-styled-components

Theme Picker Animation

Switch between themes and see how your components react

Set It Up

inside your storybook addons, register the storybook-styled-components:

// addons.js
import 'storybook-styled-components/register'

In your config.js, define your theme configuration and pass it in to the addDecorator function

// config.js
import { configure, addDecorator } from '@storybook/react'
import { withThemes } from 'storybook-styled-components'

// then import your themes
import firstTheme from './src/themes/first'
import secondTheme from './src/themes/second'

const themes = {
  'First Theme': firstTheme,
  'Second Theme': secondTheme,
}

// now add the decorator
addDecorator(withThemes(themes))
// done!

This is still a Work In Progress ... Feedback welcomed

Read The License

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.1

7 years ago

1.0.0

7 years ago