Files
uni/stories/Card.stories.ts
2023-07-10 19:26:19 +08:00

36 lines
738 B
TypeScript

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>
`,
}),
}