mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
55 lines
1.3 KiB
TypeScript
55 lines
1.3 KiB
TypeScript
import { SBComp } from '#types/SBComp'
|
|
|
|
import ExampleButton from './ExampleButton.vue'
|
|
|
|
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
|
|
// More on how to set up stories at: https://storybook.js.org/docs/vue/writing-stories/introduction
|
|
const meta = {
|
|
title: 'Example/Button',
|
|
component: ExampleButton as SBComp,
|
|
// This component will have an automatically generated docsPage entry: https://storybook.js.org/docs/vue/writing-docs/autodocs
|
|
tags: ['autodocs'],
|
|
argTypes: {
|
|
size: { control: 'select', options: ['small', 'medium', 'large'] },
|
|
backgroundColor: { control: 'color' },
|
|
onClick: { action: 'clicked' },
|
|
},
|
|
args: { primary: false }, // default value
|
|
} satisfies Meta<typeof ExampleButton>
|
|
|
|
export default meta
|
|
type Story = StoryObj<typeof meta>
|
|
/*
|
|
*👇 Render functions are a framework specific feature to allow you control on how the component renders.
|
|
* See https://storybook.js.org/docs/vue/api/csf
|
|
* to learn how to use render functions.
|
|
*/
|
|
export const Primary: Story = {
|
|
args: {
|
|
primary: true,
|
|
label: 'Button',
|
|
},
|
|
}
|
|
|
|
export const Secondary: Story = {
|
|
args: {
|
|
primary: false,
|
|
label: 'Button',
|
|
},
|
|
}
|
|
|
|
export const Large: Story = {
|
|
args: {
|
|
label: 'Button',
|
|
size: 'large',
|
|
},
|
|
}
|
|
|
|
export const Small: Story = {
|
|
args: {
|
|
label: 'Button',
|
|
size: 'small',
|
|
},
|
|
}
|