@wearesponge/storybook-addon-json
v0.0.3
Published
An addon for for Storybook to output the JSON of the loaded Coastline component.
Downloads
5
Readme
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
}
};