2.0.1 • Published 7 years ago

storybook-addon-confluence v2.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

Confluence integration with Storybook

This addon for Storybook enables you to add Atlassian Confluence pages to your stories.

Usage

Add middleware

In .storybook/middleware.js:

var buildConfluenceMiddleware = require('storybook-addon-confluence/middleware');

module.exports = buildConfluenceMiddleware('https://example.atlassian.net/wiki', 'username', 'super-secure_password');

Register add-on

In .storybook/addons.js:

import '@kadira/storybook/addons';

import 'storybook-addon-confluence/register';

Use in stories

Use <WithConfluencePage /> element in a story:

import { WithConfluencePage } from 'storybook-addon-confluence';

storiesOf('ExampleComponent', module)
  .add('Default', () => (
    <WithConfluencePage space="SPACE" title="Example component">
      <ExampleComponent />
    </WithConfluencePage>
  ));

Or use a decorator for all of the stories:

import { confluencePageDecorator } from 'storybook-addon-confluence';

storiesOf('ExampleComponent', module)
  .addDecorator(confluencePageDecorator('SPACE', 'Example component'))
  .add('Default', () => <ExampleComponent />);

Thanks

Thanks to @bendrucker for absoluteify, which provided a great reference for using the trumpet package to convert relative paths in HTML into absolute paths.

2.0.1

7 years ago

2.0.0

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago