fbredius/storybook

View on GitHub
docs/snippets/vue/app-story-with-mock.js.mdx

Summary

Maintainability
Test Coverage
```js
// App.stories.js

import App from './App.vue';

export default {
  /* 👇 The title prop is optional.
  * See https://storybook.js.org/docs/vue/configure/overview#configure-story-loading
  * to learn how to generate automatic titles
  */
  title: 'App',
  component: App,
};


const Template = () => ({
  components: { App },
  template: '<App />',
});

export const Success = Template.bind({});
Success.parameters = {
  fetch: {
    json: {
      JavaScript: 3390991,
      "C++": 44974,
      TypeScript: 15530,
      CoffeeScript: 12253,
      Python: 9383,
      C: 5341,
      Shell: 5115,
      HTML: 3420,
      CSS: 3171,
      Makefile: 189
    }
  }
};
```