generated from thzxcx/vue3
39 lines
1.1 KiB
TypeScript
39 lines
1.1 KiB
TypeScript
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
import ThCard from '../packages/card/index.vue'
|
|
import ThCardText from '../packages/card-text/index.vue'
|
|
|
|
const meta = {
|
|
title: '卡片/CardText',
|
|
component: ThCardText,
|
|
tags: ['autodocs'],
|
|
} satisfies Meta<typeof ThCardText>
|
|
export default meta
|
|
|
|
type Story = StoryObj<typeof meta>
|
|
|
|
export const Text: Story = {
|
|
args: {
|
|
label: '卡片的标签',
|
|
text: '卡片的文字',
|
|
},
|
|
name: '卡片的标签加文字',
|
|
render: args => ({
|
|
components: { ThCard, ThCardText },
|
|
setup() {
|
|
return { args }
|
|
},
|
|
template: `
|
|
<th-card>
|
|
<th-card-text :label="args.label" :text="args.text" />
|
|
<th-card-text :label="args.label" :text="args.text" />
|
|
<th-card-text :label="args.label" :text="args.text" />
|
|
<th-card-text :label="args.label" :text="args.text" />
|
|
<th-card-text :label="args.label" :text="args.text" />
|
|
<th-card-text :label="args.label" :text="args.text" />
|
|
<th-card-text :label="args.label" :text="args.text" />
|
|
<th-card-text :label="args.label" :text="args.text" />
|
|
</th-card>
|
|
`,
|
|
}),
|
|
}
|