# storybook-multiple-themeprovider

> Use your emotion themes on your favorite storybook

Latest version **1.5.1** (published 2019-11-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install storybook-multiple-themeprovider
pnpm add storybook-multiple-themeprovider
yarn add storybook-multiple-themeprovider
bun add storybook-multiple-themeprovider
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.5.1 |
| Published | 2019-11-25 |
| First published | 2019-11-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 37.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | gillerg8 |
| Keywords | storybook, emotion, styled, react, typescript |

## Links

- npm: https://www.npmjs.com/package/storybook-multiple-themeprovider
- Repository: https://github.com/gillerg8/themeprovider-storybook
- Homepage: https://github.com/gillerg8/themeprovider-storybook#readme
- Issues: https://github.com/gillerg8/themeprovider-storybook/issues
- npm.io page: https://npm.io/package/storybook-multiple-themeprovider

## Dependencies (3)

- [immutable](https://npm.io/package/immutable.md) ^4.0.0-rc.12
- [react-json-view](https://npm.io/package/react-json-view.md) ^1.19.1
- [styled-react-modal](https://npm.io/package/styled-react-modal.md) ^2.0.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.5.1 (latest) — 2019-11-25
- 1.5.0 — 2019-11-11

## README

# Storybook SC ThemeProvider

![GitHub package.json version](https://img.shields.io/github/package-json/v/semoal/themeprovider-storybook.svg)
![CircleCI (all branches)](https://img.shields.io/circleci/project/github/semoal/themeprovider-storybook.svg)
![GitHub last commit](https://img.shields.io/github/last-commit/semoal/themeprovider-storybook.svg)
![npm](https://img.shields.io/npm/dy/themeprovider-storybook.svg)
![GitHub](https://img.shields.io/github/license/semoal/themeprovider-storybook.svg)
[![Greenkeeper badge](https://badges.greenkeeper.io/semoal/themeprovider-storybook.svg)](https://greenkeeper.io/)
[![Semantic Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](semanticrelease)
## Added new features
⚠️ v1.2.0 - Added preview of the theme selected ⚠️

---

The ThemeProvider storybook addon let's you show your Emotion theme on your favourite [Storybook](https://storybook.js.org) UI at runtime.

![Screenshot](https://i.imgur.com/y1Je5xR.gif)

## Getting Started

First, install the addon

```sh
yarn add themeprovider-storybook --dev
npm install --save-dev themeprovider-storybook
```

Add this line to your `addons.js` file (create this file inside your storybook config directory if needed).

```js
import 'themeprovider-storybook/register';
```

### Set options globally

Import and use the `addDecorator` in your `config.js` file.

```js
import { addDecorator, configure } from '@storybook/react';
import { withThemesProvider } from "themeprovider-storybook";

// Options:
const themes = [
  {
    name: 'Theme1' // Required it's used for displaying the button label,
    backgroundColor: '#fff' // Optional, it's used for setting dynamic background color on storybook
    ..., // Your theme keys (Check example if you need some help)
  },
  {
    name: 'Theme2' // Required it's used for displaying the button label,
    backgroundColor: '#000'// Optional, it's used for setting dynamic background color on storybook
    ..., // Your theme keys (Check example if you need some help)
  }
]
addDecorator(withThemesProvider(themes));

configure(() => require('./stories'), module);
```

---
_Source: https://npm.io/package/storybook-multiple-themeprovider · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
