0.0.3 • Published 4 years ago

@wearesponge/storybook-addon-json v0.0.3

Weekly downloads
33
License
ISC
Repository
-
Last release
4 years ago

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
  }
};