You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

item.tsx 1.2KB

12345678910111213141516171819202122232425262728293031323334353637
  1. import type { RemixiconComponentType } from '@remixicon/react'
  2. import React from 'react'
  3. type ItemProps = {
  4. Icon: RemixiconComponentType
  5. title: string
  6. description: string
  7. onClick: () => void
  8. }
  9. const Item = ({
  10. Icon,
  11. title,
  12. description,
  13. onClick,
  14. }: ItemProps) => {
  15. return (
  16. <div
  17. className='group flex w-[337px] cursor-pointer items-center gap-x-3 rounded-xl border-[0.5px] border-components-panel-border bg-components-panel-on-panel-item-bg p-4 shadow-xs shadow-shadow-shadow-3 hover:shadow-md hover:shadow-shadow-shadow-5'
  18. onClick={onClick}
  19. >
  20. <div className='flex size-10 shrink-0 items-center justify-center rounded-[10px] border border-dashed border-divider-regular bg-background-section group-hover:border-state-accent-hover-alt group-hover:bg-state-accent-hover'>
  21. <Icon className='size-5 text-text-quaternary group-hover:text-text-accent' />
  22. </div>
  23. <div className='flex grow flex-col gap-y-0.5 py-px'>
  24. <div className='system-md-semibold truncate text-text-secondary'>
  25. {title}
  26. </div>
  27. <div className='system-xs-regular text-text-tertiary'>
  28. {description}
  29. </div>
  30. </div>
  31. </div>
  32. )
  33. }
  34. export default React.memo(Item)