import type { HTMLAttributes, ReactNode } from "react"; import { Children } from "react"; import { CornerCard } from "./CornerCard"; type CardsProps = HTMLAttributes & { children: ReactNode; }; type CardProps = { children?: ReactNode; href?: string; icon?: ReactNode; title: string; }; export function Cards({ children, className, ...props }: CardsProps) { const count = Children.count(children); return (
1 ? "sm:grid-cols-2" : ""}${className ? ` ${className}` : ""}`} > {children}
); } export function Card({ children, href, icon, title }: CardProps) { const content = (
{icon ?
{icon}
: null}

{title}

{children ? (
{children}
) : null}
); if (!href) return
{content}
; return ( {content} ); }