@wearesponge/storybook-addon-json

0.0.3 • Public • Published

Storybook Addon JSON

An addon for for Storybook to output the JSON of the loaded Coastline component.

Build Instructions

npm run build:dev

Installation Instructions

npm install @wearesponge/storybook-addon-json --save-dev

Usage

In .storybook/addons.js import the addon:

import '@wearesponge/storybook-addon-json';

In your story:

let componentJSON: IMyComponent = {
    ...
};

export const Default: any = () => ({
  components: { MyComponent },
  data() {
    return {
      element: componentJSON
    };
  },
  template: "<my-component :element='element' />"
});

Default.story = {
  parameters: {
    json: componentJSON
  }
};

Readme

Keywords

none

Package Sidebar

Install

npm i @wearesponge/storybook-addon-json

Weekly Downloads

1

Version

0.0.3

License

ISC

Unpacked Size

5.35 kB

Total Files

5

Last publish

Collaborators

  • finbsponge
  • christiancooksponge