wwf
3 天以前 a430284aa21e3ae1f0d5654e55b2ad2852519cc2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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>,
  },
}