Skip to content

allow to dynamically generate stories / args #1

@tobiasdiez

Description

@tobiasdiez

Example of how this may look:

<template>
  <Stories>
    <Story
      v-for="(argument, key) of arguments"
      :title="'Story ' + key"
    >
      <MyComponent :argument="argument" />
    </Story>
  </Stories>
</template>
<script lang="ts" setup>
import MyComponent from './MyComponent.vue'

const arguments = ["hello", "world"]
</script>

This is currently blocked by storybookjs/storybook#9828.

Once this is implemented, add https://storybook.js.org/docs/vue/writing-stories/introduction#using-args as example.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: enhancementImproving upon an existing feature

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions