pocka / storybook-addon-vue-info

Info addon for Vue components
https://storybook-addon-vue-info.netlify.com/?path=/story/examples-basic-usage--simple-example
MIT License
164 stars 28 forks source link

Add `description` story option #111

Closed pocka closed 5 years ago

pocka commented 5 years ago

close #106

This PR adds description story option which replaces the propsDescription. The intent of this change is 1) support for descriptions for slots and events 2) provide more clean API.

storiesOf(/* ... */)
  .add('foo', () => ({
    template: '<foo/>'
    description: {
      Foo: {
        props: {
          disabled: 'disabled prop'
        },
        events: {
          click: 'click event'
        },
        slots: {
          icon: 'icon slot'
        },
      }
    }
  }))

Live demo

Xayer commented 5 years ago

😍