Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dreipol/storybook-confluence-addon
Storybook confluence addon
https://github.com/dreipol/storybook-confluence-addon
Last synced: 7 days ago
JSON representation
Storybook confluence addon
- Host: GitHub
- URL: https://github.com/dreipol/storybook-confluence-addon
- Owner: dreipol
- License: mit
- Created: 2019-06-03T12:23:22.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-06T16:45:14.000Z (almost 2 years ago)
- Last Synced: 2023-03-22T17:47:49.786Z (over 1 year ago)
- Language: TypeScript
- Size: 230 KB
- Stars: 2
- Watchers: 5
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Description
Confluence storybook addon to embed private and public confluence pages.
This addon was designed and tested only in a react environment.[![Build Status][circleci-image]][circleci-url]
[![NPM downloads][npm-downloads-image]][npm-url]
[![NPM version][npm-version-image]][npm-url]
[![Code quality][codeclimate-image]][codeclimate-url]
[![MIT License][license-image]][license-url]# Installation
```bash
npm i @dreipol/storybook-confluence-addon -D
```# Usage
1. Register the plugin in `addons.js`
```js
import '@dreipol/storybook-confluence-addon/register';
```
2. Set your confluence project id and API token
```js
import { addDecorator } from '@storybook/react';
import { withConfluence } from '@dreipol/storybook-confluence-addon';addDecorator(withConfluence({
username: process.env.CONFLUENCE_USERNAME,
password: process.env.CONFLUENCE_PASSWORD,
domain: process.env.CONFLUENCE_DOMAIN,
}));
```
3. Use it in your component stories
```jsx harmony
stories.add(
'Default',
() => ,
{
// the id of the confluence page we want to fetch
confluence: {
id: 'foo',
},
},
);
```
[circleci-image]: https://circleci.com/gh/dreipol/storybook-confluence-addon.svg?style=svg
[circleci-url]: https://circleci.com/gh/dreipol/storybook-confluence-addon
[license-image]: http://img.shields.io/badge/license-MIT-000000.svg?style=flat-square
[license-url]: LICENSE
[npm-version-image]: http://img.shields.io/npm/v/@dreipol/storybook-confluence-addon.svg?style=flat-square
[npm-downloads-image]: http://img.shields.io/npm/dm/@dreipol/storybook-confluence-addon.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@dreipol/storybook-confluence-addon
[codeclimate-image]: https://api.codeclimate.com/v1/badges/8d977f051efffb8ef19c/maintainability
[codeclimate-url]: https://codeclimate.com/github/dreipol/storybook-confluence-addon/maintainability