import React, { ReactNode } from "react"; import * as Icons from "lucide-react"; import Link from "next/link"; import clsx from "clsx"; type IconName = keyof typeof Icons; interface CardProps { title: string; icon?: IconName; href?: string; horizontal?: boolean; children: ReactNode; className?: string; } const Card: React.FC = ({ title, icon, href, horizontal, children, className }) => { const Icon = icon ? (Icons[icon] as React.FC<{ className?: string }>) : null; const content = (
{Icon && }
{title}
{children}
); return href ? {content} : content; }; export default Card;