Initial commit from monorepo
This commit is contained in:
46
app/components/ui/Button.stories.ts
Normal file
46
app/components/ui/Button.stories.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
import type { Meta, StoryObj } from '@storybook/vue3'
|
||||
import Button from './Button.vue'
|
||||
|
||||
const meta: Meta<typeof Button> = {
|
||||
title: 'UI/Button',
|
||||
component: Button,
|
||||
render: (args) => ({
|
||||
components: { Button },
|
||||
setup() {
|
||||
return { args }
|
||||
},
|
||||
template: '<Button v-bind="args">{{ args.label }}</Button>'
|
||||
}),
|
||||
argTypes: {
|
||||
variant: {
|
||||
control: { type: 'select' },
|
||||
options: ['primary', 'outline']
|
||||
}
|
||||
},
|
||||
tags: ['autodocs']
|
||||
}
|
||||
|
||||
export default meta
|
||||
type Story = StoryObj<typeof meta>
|
||||
|
||||
export const Primary: Story = {
|
||||
args: {
|
||||
label: 'Primary button',
|
||||
variant: 'primary'
|
||||
}
|
||||
}
|
||||
|
||||
export const Outline: Story = {
|
||||
args: {
|
||||
label: 'Outline button',
|
||||
variant: 'outline'
|
||||
}
|
||||
}
|
||||
|
||||
export const FullWidth: Story = {
|
||||
args: {
|
||||
label: 'Full width',
|
||||
variant: 'primary',
|
||||
fullWidth: true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user