item.tsx 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import React, { type FC } from 'react'
  2. import cn from '@/utils/classnames'
  3. type ItemProps = {
  4. titleWidth: string
  5. releaseNotesWidth: string
  6. isFirst: boolean
  7. isLast: boolean
  8. }
  9. const Item: FC<ItemProps> = ({
  10. titleWidth,
  11. releaseNotesWidth,
  12. isFirst,
  13. isLast,
  14. }) => {
  15. return (
  16. <div className='flex gap-x-1 relative p-2' >
  17. {!isLast && <div className='absolute w-0.5 h-[calc(100%-0.75rem)] left-4 top-6 bg-divider-subtle' />}
  18. <div className=' flex items-center justify-center shrink-0 w-[18px] h-5'>
  19. <div className='w-2 h-2 border-[2px] rounded-lg border-text-quaternary' />
  20. </div>
  21. <div className='flex flex-col grow gap-y-0.5'>
  22. <div className='flex items-center h-3.5'>
  23. <div className={cn('h-2 w-full bg-text-quaternary rounded-sm opacity-20', titleWidth)} />
  24. </div>
  25. {
  26. !isFirst && (
  27. <div className='flex items-center h-3'>
  28. <div className={cn('h-1.5 w-full bg-text-quaternary rounded-sm opacity-20', releaseNotesWidth)} />
  29. </div>
  30. )
  31. }
  32. </div>
  33. </div>
  34. )
  35. }
  36. export default React.memo(Item)