ActionCard.tsx 850 B

1234567891011121314151617181920212223242526272829
  1. import type { ReactNode } from 'react'
  2. import { Card } from 'ui'
  3. export const ActionCard = (card: {
  4. icon: ReactNode
  5. title: string
  6. description: string
  7. bgColor: string
  8. onClick?: () => void
  9. }) => {
  10. return (
  11. <Card
  12. className="grow bg-surface-100 p-3 transition-colors hover:bg-surface-200 border hover:border-default cursor-pointer"
  13. onClick={card.onClick}
  14. >
  15. <div className={`relative flex items-start gap-3`}>
  16. <div
  17. className={`rounded-full ${card.bgColor} w-8 h-8 flex items-center justify-center shrink-0`}
  18. >
  19. {card.icon}
  20. </div>
  21. <div className="flex flex-col gap-0">
  22. <h3 className="text-sm text-foreground mb-0">{card.title}</h3>
  23. <p className="text-xs text-foreground-light">{card.description}</p>
  24. </div>
  25. </div>
  26. </Card>
  27. )
  28. }