# storybook-addon-custom-properties

> Storybook addon to set the Custom Properties in Preview AreaStorybook addon to set the Custom Property in Preview Area

Latest version **0.0.2** (published 2020-06-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install storybook-addon-custom-properties
pnpm add storybook-addon-custom-properties
yarn add storybook-addon-custom-properties
bun add storybook-addon-custom-properties
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2020-06-25 |
| First published | 2020-06-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 18.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | t4y3 |

## Links

- npm: https://www.npmjs.com/package/storybook-addon-custom-properties
- npm.io page: https://npm.io/package/storybook-addon-custom-properties

## Dependencies (3)

- [@storybook/api](https://npm.io/package/@storybook/api.md) ^5.3.19
- [@storybook/addons](https://npm.io/package/@storybook/addons.md) ^5.3.19
- [@storybook/components](https://npm.io/package/@storybook/components.md) ^5.3.19

## Recent versions

- 0.0.2 (latest) — 2020-06-25
- 0.0.1 — 2020-06-24

## README

# Storybook Custom Properties Addon

Storybook Custom Properties Addon allows you to set a Custom Properties in the Preview Area. This helps to change the style of the Storybook via Custom Properties.

## Installation

Install the following npm module:

```sh
npm i --save-dev storybook-addon-custom-properties
```

within `.storybook/main.js`:

```js
module.exports = {
  addons: ['storybook-addon-custom-properties/register'],
};
```

## Configuration

Configured by story parameters with the `custom-properties` key. 

```js
import { withCustomProperties } from 'storybook-addon-custom-properties';

addParameters({
  'custom-properties': {
    label: 'Theme',
    list: [
      { '--somekeyword': 'left' },
      { '--somecolor': '#0000ff' },
      { '--somecomplexvalue': '3px 6px rgb(20, 32, 54)' }, 
    ]
  }
});

addDecorator(withCustomProperties);
```

## TODO
- Doc
- Ts
- formatter

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