Themeprovider Storybook

screenshot of Themeprovider Storybook
react
styled-components

Use your theme-provider on your favourite storybook

Overview:

The Storybook SC ThemeProvider is an addon that allows users to display a Styled-Components ThemeProvider or a custom one in their Storybook. It works on both Storybook 5.x.x and 6.x.x versions and offers features such as switching background colors, compatibility with iframes or visual regression testing, and the ability to pass a custom implementation of a theme provider. The addon also includes a popup displaying all the current keys of the theme, which can be disabled if desired.

Features:

  • Works on Storybook 5.x.x and 6.x.x: Compatible with both versions of Storybook.
  • Switches background color: Ability to toggle between different background colors.
  • Works on iframes or visual regression testing: Ensures compatibility when displaying within iframes or during visual regression testing.
  • Allows passing a custom implementation of your own theme provider: Users can customize the theme provider to their specific needs.
  • Displays a popup with all the current keys of the theme: Provides a convenient way to view all the keys of the theme.
  • Ability to disable the popup: Users can choose to disable the popup if they prefer.
  • Ability to copy a value from the theme: Makes it easy to copy individual values from the theme.
react
React

React is a widely used JavaScript library for building user interfaces and single-page applications. It follows a component-based architecture and uses a virtual DOM to efficiently update and render UI components

styled-components
Styled Components

Styled Components is a popular library for styling React components using CSS syntax. It allows you to write CSS in your JavaScript code, making it easier to create dynamic styles that are specific to each component.

eslint
Eslint

ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.

Storybook

Storybook is a tool for developing and testing UI components in isolation. It provides a sandbox environment where you can experiment with different props and states to see how your component responds.

typescript
Typescript

TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.