feat: 展示组件/Tag

This commit is contained in:
peerless_hero
2023-07-11 04:05:25 +08:00
parent 916a869300
commit 4cc994aa27
2 changed files with 126 additions and 0 deletions

49
stories/Tag.stories.ts Normal file
View 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',
},
}