Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bluebasejs/storybook-addon
A Storybook JS addon to test BlueBase components in Storybook
https://github.com/bluebasejs/storybook-addon
Last synced: about 2 months ago
JSON representation
A Storybook JS addon to test BlueBase components in Storybook
- Host: GitHub
- URL: https://github.com/bluebasejs/storybook-addon
- Owner: BlueBaseJS
- License: mit
- Created: 2018-10-27T05:24:31.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-07-26T06:09:11.000Z (over 3 years ago)
- Last Synced: 2024-11-02T02:37:20.509Z (3 months ago)
- Language: TypeScript
- Size: 1.5 MB
- Stars: 0
- Watchers: 9
- Forks: 0
- Open Issues: 25
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: code-of-conduct.md
Awesome Lists containing this project
README
BlueBase Storybook Addon
## Getting started
### Installation:
```sh
npm i --save-dev @bluebase/storybook-addon
```### Configuration
```javascript
import React from 'react';
import { configure, addDecorator } from '@storybook/react';
import { BlueBaseDecorator } from '@bluebase/storybook-addon';const BRConfigs = require('../bluerain');
addDecorator(BlueBaseDecorator(BRConfigs));const req = require.context('../src', true, /.stories.tsx$/);
function loadStories() {
req.keys().forEach((filename) => req(filename));
}
configure(loadStories, module);
```### Usage
In your story, test a BlueBase component like this:
```typescript
import { BlueBase, BlueBaseConsumer } from '@blueeast/bluerain-os';
import React from 'react';
import storiesOf from '@bluebase/storybook-addon';storiesOf('Some Story', module)
.add('story', () => (
{(BB: BlueBase) => }
));
```