Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/faebeee/storybook-badges


https://github.com/faebeee/storybook-badges

Last synced: about 5 hours ago
JSON representation

Awesome Lists containing this project

README

        

# @faebeee/storybook-badges

Storybook addon to add a new Tab which can show a
status of the shown component. So you can easily keep
track of the state of a component. For example you can visualize
if it's already release. Or if its a draft or needs a redesign or if it's
still in development

![Example](./doc/example.png)

## install

npm i @faebeee/storybook-badges

add the addon

import '@faebeee/storybook-badges';

configure default config

.storybook/config.js

import { addDecorator, addParameters } from '@storybook/react';
addParameters({
badges: {
icon_size: 50,
icons: {
'utility': {
icon: '/assets/img/utility-comp.png',
text: "Utility Component"
},
}
},
});

and in your story

const stories = storiesOf('Component', module)

stories.add(
'Default',
() => (),
{
badges: {
badges: ['utility'],
},
}
);