Add description of each prop in Storybook with Vue 2

Viewed 277

I'm extending Vuetify table with my custom colums so I made a wrapper around it:

<template>
  <div>
    <custom-component>
    </custom-component>
    <v-data-table v-bind="$attrs">
      <template>
       // Custom columns
      </template>
    </v-data-table>
  </div>
</template>

In the $attrs there is a 'headers' and 'items' props. Now in the MyDataTable.stories.js I've created mock data:

Default.args = {
  /** It doesn't work */
  headers: tableHeaders,
  items: tableContent,
  };

How can I add description to that props? I've tried with /** */ but it seems to only work in my CustomTable.vue file with defined props and not passed as $attrs and I don't want to use MDX.

Rest look like that:

const Template = (args, { argTypes }) => ({
  props: Object.keys(argTypes),
  components: {  MyDataTable },
  template:
      '<my-data-table v-bind="$props"/>',
});

export const Default = Template.bind({});
0 Answers
Related