& {
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 ? (
) : null}
);
if (!href) return {content}
;
return (
{content}
);
}