ExplorerSectionCard.jsx 868 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import React from "react";
  2. import {
  3. Card,
  4. CardHeader,
  5. CardTitle,
  6. CardDescription,
  7. CardContent,
  8. CardAction,
  9. } from "@/components/ui/card";
  10. /**
  11. * ExplorerSectionCard
  12. *
  13. * A reusable Card wrapper for Explorer content blocks.
  14. * Keeps all levels visually consistent (spacing, typography, optional "count" badge).
  15. *
  16. * @param {{
  17. * title: string,
  18. * description?: string|null,
  19. * headerRight?: React.ReactNode,
  20. * children: React.ReactNode
  21. * }} props
  22. */
  23. export default function ExplorerSectionCard({
  24. title,
  25. description = null,
  26. headerRight = null,
  27. children,
  28. }) {
  29. return (
  30. <Card>
  31. <CardHeader>
  32. <CardTitle>{title}</CardTitle>
  33. {description ? <CardDescription>{description}</CardDescription> : null}
  34. {headerRight ? <CardAction>{headerRight}</CardAction> : null}
  35. </CardHeader>
  36. <CardContent>{children}</CardContent>
  37. </Card>
  38. );
  39. }