Socket
Socket
Sign inDemoInstall

vue-cli-plugin-vuetify-storybook

Package Overview
Dependencies
1
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vue-cli-plugin-vuetify-storybook

A Vue CLI 3 Plugin for bootstrapping Storybook with Vuetify


Version published
Weekly downloads
340
increased by50.44%
Maintainers
1
Install size
1.36 MB
Created
Weekly downloads
 

Readme

Source

vue-cli-plugin-vuetify-storybook

A Vuetify Storybook Plugin for vue-cli@3.0

💿 Install

vue add vuetify-storybook

Once installed, you can run:

yarn serve:storybook
# OR
npm run serve:storybook

🚀 Usage

To add new stories, simply create a new file that contains .stories.js. An example exists in .storybook/stories/example.stories.js of your project.

Creating stories

If you are using vue-cli-plugin-vuetify-cli, stories will be automatically generated when you create new components.

// A helper function to faciliate the generation of stories
import { storyFactory } from '../util/helpers'

// Components
import { AnotherComponent } from 'path/to/component'

// Generate a factory function
// Will automatically bootstrap the story components
const story = storyFactory({
  // Can pass in an import function
  MyComponent: () => import('path/to/component'),
  // Or explicitly import and use
  AnotherComponent,
})

export const asDefault = () => story({
  template: `<my-component></my-component>`,
})

export const withAnotherComponent = () => story({
  template: `
    <my-component>
      <another-component></another-component>
    </my-component>
  `,
})

💪 Supporting Vuetify

Vuetify is an open source MIT project that has been made possible due to the generous contributions by community backers. If you are interested in supporting this project, please consider:

📑 License

MIT

Copyright (c) 2016-present Vuetify LLC

FAQs

Last updated on 28 Feb 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc