index.tsx 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. import type { ReactNode } from 'react'
  2. import React from 'react'
  3. import { Variable02 } from '../icons/src/vender/solid/development'
  4. import VerticalLine from './vertical-line'
  5. import HorizontalLine from './horizontal-line'
  6. type ListEmptyProps = {
  7. title?: string
  8. description?: ReactNode
  9. icon?: ReactNode
  10. }
  11. const ListEmpty = ({
  12. title,
  13. description,
  14. icon,
  15. }: ListEmptyProps) => {
  16. return (
  17. <div className='flex w-[320px] flex-col items-start gap-2 rounded-[10px] bg-workflow-process-bg p-4'>
  18. <div className='flex h-10 w-10 items-center justify-center gap-2 rounded-[10px]'>
  19. <div className='relative flex grow items-center justify-center gap-2 self-stretch rounded-[10px] border-[0.5px]
  20. border-components-card-border bg-components-card-bg p-1 shadow-lg'>
  21. {icon || <Variable02 className='h-5 w-5 shrink-0 text-text-accent' />}
  22. <VerticalLine className='absolute -right-[1px] top-1/2 -translate-y-1/4'/>
  23. <VerticalLine className='absolute -left-[1px] top-1/2 -translate-y-1/4'/>
  24. <HorizontalLine className='absolute left-3/4 top-0 -translate-x-1/4 -translate-y-1/2'/>
  25. <HorizontalLine className='absolute left-3/4 top-full -translate-x-1/4 -translate-y-1/2' />
  26. </div>
  27. </div>
  28. <div className='flex flex-col items-start gap-1 self-stretch'>
  29. <div className='system-sm-medium text-text-secondary'>{title}</div>
  30. {description}
  31. </div>
  32. </div>
  33. )
  34. }
  35. export default ListEmpty