"use client";
import { Sparkles } from "lucide-react";
import { cn } from "@/lib/utils";
interface DisplayCardProps {
className?: string;
icon?: React.ReactNode;
title?: string;
description?: string;
date?: string;
iconClassName?: string;
titleClassName?: string;
}
function DisplayCard({
className,
icon = ,
title = "Featured",
description = "Discover amazing content",
date = "Just now",
iconClassName = "text-blue-500",
titleClassName = "text-blue-500",
}: DisplayCardProps) {
return (
*]:flex [&>*]:items-center [&>*]:gap-2",
className
)}
>
{description}
{date}
);
}
interface DisplayCardsProps {
cards?: DisplayCardProps[];
}
export default function DisplayCards({ cards }: DisplayCardsProps) {
const defaultCards = [
{
className:
"[grid-area:stack] hover:-translate-y-10 before:absolute before:w-[100%] before:outline-1 before:rounded-xl before:outline-border before:h-[100%] before:content-[''] before:bg-blend-overlay before:bg-background/50 grayscale-[100%] hover:before:opacity-0 before:transition-opacity before:duration:700 hover:grayscale-0 before:left-0 before:top-0",
},
{
className:
"[grid-area:stack] translate-x-16 translate-y-10 hover:-translate-y-1 before:absolute before:w-[100%] before:outline-1 before:rounded-xl before:outline-border before:h-[100%] before:content-[''] before:bg-blend-overlay before:bg-background/50 grayscale-[100%] hover:before:opacity-0 before:transition-opacity before:duration:700 hover:grayscale-0 before:left-0 before:top-0",
},
{
className: "[grid-area:stack] translate-x-32 translate-y-20 hover:translate-y-10",
},
];
const displayCards = cards || defaultCards;
return (
{displayCards.map((cardProps, index) => (
))}
);
}