mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-06-03 18:54:11 +08:00
34 lines
796 B
TypeScript
34 lines
796 B
TypeScript
import type { Meta, StoryObj } from '@storybook/react'
|
|
|
|
import type { ChatItem } from '../types'
|
|
import Question from './question'
|
|
import { User } from '@/app/components/base/icons/src/public/avatar'
|
|
|
|
const meta = {
|
|
title: 'Base/Chat Question',
|
|
component: Question,
|
|
parameters: {
|
|
layout: 'centered',
|
|
},
|
|
tags: ['autodocs'],
|
|
argTypes: {},
|
|
args: {},
|
|
} satisfies Meta<typeof Question>
|
|
|
|
export default meta
|
|
type Story = StoryObj<typeof meta>
|
|
|
|
export const Default: Story = {
|
|
args: {
|
|
item: {
|
|
id: '1',
|
|
isAnswer: false,
|
|
content: 'You are a helpful assistant.',
|
|
} satisfies ChatItem,
|
|
theme: undefined,
|
|
questionIcon: <div className='w-full h-full rounded-full border-[0.5px] border-black/5'>
|
|
<User className='w-full h-full' />
|
|
</div>,
|
|
},
|
|
}
|