LogDrainsCard.tsx 965 B

12345678910111213141516171819202122232425262728293031323334
  1. import { Card } from 'ui'
  2. interface LogDrainsCardProps {
  3. title: string
  4. description: string
  5. rightLabel?: string
  6. icon: React.ReactNode
  7. onClick: () => void
  8. }
  9. export const LogDrainsCard = ({
  10. title,
  11. description,
  12. rightLabel,
  13. icon,
  14. onClick,
  15. }: LogDrainsCardProps) => {
  16. return (
  17. <button className="w-full h-full text-left" onClick={onClick}>
  18. <Card className="p-6 cursor-pointer hover:bg-surface-200 hover:border-strong transition-colors h-48">
  19. <div className="flex flex-col gap-5">
  20. <div className="flex items-start justify-between w-full">
  21. <div>{icon}</div>
  22. <div className="text-xs text-foreground-light">{rightLabel}</div>
  23. </div>
  24. <div className="flex flex-col gap-1">
  25. <h1 className="text-base">{title}</h1>
  26. <p className="text-sm text-foreground-light leading-relaxed">{description}</p>
  27. </div>
  28. </div>
  29. </Card>
  30. </button>
  31. )
  32. }