generated from thzxcx/vue3
feat: 展示组件/Tag
This commit is contained in:
49
stories/Tag.stories.ts
Normal file
49
stories/Tag.stories.ts
Normal file
@ -0,0 +1,49 @@
|
||||
/*
|
||||
* @Author: peerless_hero peerless_hero@outlook.com
|
||||
* @Date: 2023-07-11 02:12:08
|
||||
* @LastEditors: peerless_hero peerless_hero@outlook.com
|
||||
* @LastEditTime: 2023-07-11 03:02:55
|
||||
* @FilePath: \uni\stories\Tag.stories.ts
|
||||
* @Description:
|
||||
*
|
||||
*/
|
||||
import type { Meta, StoryObj } from '@storybook/vue3'
|
||||
import ThTag from '../packages/tag/index.vue'
|
||||
|
||||
const meta = {
|
||||
title: '展示组件/Tag',
|
||||
component: ThTag,
|
||||
args: {
|
||||
text: '默认',
|
||||
type: 'default',
|
||||
},
|
||||
argTypes: {
|
||||
type: { control: 'select', options: ['default', 'warning', 'error'] },
|
||||
},
|
||||
tags: ['autodocs'],
|
||||
} satisfies Meta<typeof ThTag>
|
||||
export default meta
|
||||
|
||||
type Story = StoryObj<typeof meta>
|
||||
|
||||
export const Default: Story = {
|
||||
args: {
|
||||
text: '默认',
|
||||
type: 'default',
|
||||
},
|
||||
}
|
||||
|
||||
export const Warning: Story = {
|
||||
args: {
|
||||
text: '警告',
|
||||
type: 'warning',
|
||||
},
|
||||
}
|
||||
|
||||
export const ErrorType: Story = {
|
||||
name: 'Error',
|
||||
args: {
|
||||
text: '错误',
|
||||
type: 'error',
|
||||
},
|
||||
}
|
Reference in New Issue
Block a user