import { Card } from "@/components/ui/card"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { Code, Copy, ExternalLink } from "lucide-react"; import { Link } from "react-router-dom"; interface ExampleCardProps { id: string; title: string; description: string; category: string; language: string; difficulty: "beginner" | "intermediate" | "advanced"; tags: string[]; lines: number; } const difficultyColors = { beginner: "bg-green-500/10 text-green-500 border-green-500/20", intermediate: "bg-yellow-500/10 text-yellow-500 border-yellow-500/20", advanced: "bg-red-500/10 text-red-500 border-red-500/20", }; export function ExampleCard({ id, title, description, category, language, difficulty, tags, lines, }: ExampleCardProps) { return (

{title}

{description}

{category} {language} {difficulty}
{tags.slice(0, 3).map((tag) => ( {tag} ))} {tags.length > 3 && ( +{tags.length - 3} )}
{lines} lines
); }