Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mixmaxhq/storybook-addon-contributors

Contributors information addon for storybook.js
https://github.com/mixmaxhq/storybook-addon-contributors

storybook storybook-addon supported

Last synced: about 1 month ago
JSON representation

Contributors information addon for storybook.js

Awesome Lists containing this project

README

        

# storybook-addon-contributors
Storybook Addon Contributors allow you to view the contributors information using the Storybook UI.

This is how Contributors look like:
![](docs/screenshot.png)

## Getting started
First, install the addon.
```
$ npm add @mixmaxhq/storybook-addon-contributors --dev
```

Add this line to your addons.js file (create this file inside your storybook config directory if needed).
```javascript
import '@mixmaxhq/storybook-addon-contributors/register';
```

Import the withContributors decorator to check your stories for contributors information.
```javascript
import { withContributors } from '@mixmaxhq/storybook-addon-contributors';

// should only be added once
// best place is in config.js
addDecorator(withContributors)
```

Here is an example of using Contributors with a React component.
```javascript
Button.contributors = [
{
name: 'Andy Tran',
url: 'https://github.com/andyhqtran',
},
];
```