Socket
Socket
Sign inDemoInstall

storybook-styled-components

Package Overview
Dependencies
23
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    storybook-styled-components

![Theme Picker Animation](./docs/theme-picker.gif)


Version published
Weekly downloads
8.3K
increased by19.42%
Maintainers
1
Install size
1.05 MB
Created
Weekly downloads
 

Readme

Source

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

FAQs

Last updated on 07 Jun 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc