generated from unplugin/unplugin-starter
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
status: waiting for infotype: enhancementImproving upon an existing featureImproving upon an existing feature
Description
The issue
Currently, in Storybook you have the possibility to define argTypes
either via automatic inference or by manually setting the properties..
Manually setting argTypes
brings the benefit to allow for a specific value to be selected within the controls, or overriding/customizing descriptions.
Syntax proposal
<script setup lang="ts">
import BButton from "./b-button.vue";
defineArgs<typeof BButton>({
variant: {
options: ["primary", "secondary"],
control: "select",
},
label: {
control: "text",
description: "This is the text displayed on the button."
},
});
</script>
<template>
<Stories title="Components/Button" :component="BButton">
<Story title="Primary">
<BButton variant="primary" label="Click"/>
</Story>
<Story title="Secondary">
<BButton variant="secondary" label="Click" />
</Story>
</Stories>
</template>
andreasvirkus, andriepu, tobiasdiez and JoJk0
Metadata
Metadata
Assignees
Labels
status: waiting for infotype: enhancementImproving upon an existing featureImproving upon an existing feature