index.tsx 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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] p-4 flex-col items-start gap-2 rounded-[10px] bg-workflow-process-bg'>
  18. <div className='flex w-10 h-10 justify-center items-center gap-2 rounded-[10px]'>
  19. <div className='flex relative p-1 justify-center items-center gap-2 grow self-stretch rounded-[10px]
  20. border-[0.5px] border-components-card-border bg-components-card-bg shadow-lg'>
  21. {icon || <Variable02 className='w-5 h-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 top-0 left-3/4 -translate-x-1/4 -translate-y-1/2'/>
  25. <HorizontalLine className='absolute top-full left-3/4 -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='text-text-secondary system-sm-medium'>{title}</div>
  30. {description}
  31. </div>
  32. </div>
  33. )
  34. }
  35. export default ListEmpty