question.stories.tsx 796 B

12345678910111213141516171819202122232425262728293031323334
  1. import type { Meta, StoryObj } from '@storybook/react'
  2. import type { ChatItem } from '../types'
  3. import Question from './question'
  4. import { User } from '@/app/components/base/icons/src/public/avatar'
  5. const meta = {
  6. title: 'Base/Chat Question',
  7. component: Question,
  8. parameters: {
  9. layout: 'centered',
  10. },
  11. tags: ['autodocs'],
  12. argTypes: {},
  13. args: {},
  14. } satisfies Meta<typeof Question>
  15. export default meta
  16. type Story = StoryObj<typeof meta>
  17. export const Default: Story = {
  18. args: {
  19. item: {
  20. id: '1',
  21. isAnswer: false,
  22. content: 'You are a helpful assistant.',
  23. } satisfies ChatItem,
  24. theme: undefined,
  25. questionIcon: <div className='h-full w-full rounded-full border-[0.5px] border-black/5'>
  26. <User className='h-full w-full' />
  27. </div>,
  28. },
  29. }