generated from thzxcx/vue3
feat: 卡片等组件
This commit is contained in:
38
stories/CardText.stories.ts
Normal file
38
stories/CardText.stories.ts
Normal file
@ -0,0 +1,38 @@
|
||||
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>
|
||||
`,
|
||||
}),
|
||||
}
|
Reference in New Issue
Block a user