section-card.tsx 820 B

1234567891011121314151617181920212223242526272829303132333435
  1. import Link from "next/link";
  2. import type { ReactNode } from "react";
  3. import styles from "./section-card.module.scss";
  4. export const SectionCard = ({
  5. title,
  6. description,
  7. urlLabel,
  8. url,
  9. image,
  10. }: {
  11. title: string;
  12. description: string;
  13. urlLabel?: string;
  14. url?: string;
  15. image?: ReactNode;
  16. }) => (
  17. <div className={styles.sectionCard}>
  18. <div className={styles.sectionCardHeader}>
  19. <h3 className={styles.sectionCardTitle}>{title}</h3>
  20. {image}
  21. </div>
  22. <p className={styles.sectionCardDescription}>{description}</p>
  23. {url && urlLabel && (
  24. <Link href={url} className={styles.sectionCardUrl}>
  25. {urlLabel}
  26. </Link>
  27. )}
  28. </div>
  29. );
  30. export const SectionCards = ({ children }: { children: ReactNode }) => (
  31. <div className={styles.sectionCards}>{children}</div>
  32. );