generated from thzxcx/vue3
feat: 卡片等组件
This commit is contained in:
35
stories/Card.stories.ts
Normal file
35
stories/Card.stories.ts
Normal file
@ -0,0 +1,35 @@
|
||||
import type { Meta, StoryObj } from '@storybook/vue3'
|
||||
import ThCard from '../packages/card/index.vue'
|
||||
import ThCardTitle from '../packages/card-title/index.vue'
|
||||
|
||||
const meta = {
|
||||
title: '卡片/Card',
|
||||
component: ThCard,
|
||||
tags: ['autodocs'],
|
||||
render: (args: any) => ({
|
||||
components: { ThCard },
|
||||
setup() {
|
||||
return { args }
|
||||
},
|
||||
template: '<div w-full><th-card /></div>',
|
||||
}),
|
||||
} satisfies Meta<typeof ThCard>
|
||||
export default meta
|
||||
|
||||
type Story = StoryObj<typeof meta>
|
||||
|
||||
export const Title: Story = {
|
||||
render: (args: any) => ({
|
||||
components: { ThCard, ThCardTitle },
|
||||
setup() {
|
||||
return { args }
|
||||
},
|
||||
template: `
|
||||
<th-card>
|
||||
<th-card-title>
|
||||
Title
|
||||
</th-card-title>
|
||||
</th-card>
|
||||
`,
|
||||
}),
|
||||
}
|
Reference in New Issue
Block a user