| // src/components/tools/FeaturedTools.tsx | |
| import { Link } from "react-router-dom"; | |
| import { Sparkles, Download, Star } from "lucide-react"; | |
| import { Tool } from "@/types/tool"; | |
| interface FeaturedToolsProps { | |
| tools: Tool[]; | |
| } | |
| export function FeaturedTools({ tools }: FeaturedToolsProps) { | |
| if (tools.length === 0) return null; | |
| return ( | |
| <div className="space-y-3"> | |
| <div className="flex items-center gap-2"> | |
| <Sparkles className="h-5 w-5 text-amber-500" /> | |
| <h2 className="text-lg font-semibold text-slate-900 dark:text-white">Featured Tools</h2> | |
| </div> | |
| <div className="grid gap-4 sm:grid-cols-2 lg:grid-cols-3"> | |
| {tools.map((tool) => ( | |
| <Link | |
| key={tool.id} | |
| to={`/tools/${tool.id}`} | |
| className="group relative overflow-hidden rounded-2xl border-2 border-amber-200 bg-gradient-to-br from-amber-50 to-white p-5 shadow-sm transition hover:-translate-y-1 hover:shadow-lg dark:border-amber-800 dark:from-amber-950/30 dark:to-gray-800" | |
| > | |
| <div className="absolute top-2 right-2"> | |
| <Sparkles className="h-4 w-4 text-amber-500" /> | |
| </div> | |
| <div className="text-3xl">{tool.icon}</div> | |
| <h3 className="mt-3 font-semibold text-slate-900 dark:text-white">{tool.name}</h3> | |
| <p className="mt-1 line-clamp-2 text-sm text-slate-600 dark:text-gray-400">{tool.description}</p> | |
| <div className="mt-3 flex items-center gap-3 text-xs text-slate-500 dark:text-gray-400"> | |
| <span className="flex items-center gap-1"><Download className="h-3 w-3" /> {tool.downloads.toLocaleString()}</span> | |
| <span className="flex items-center gap-1"><Star className="h-3 w-3 text-amber-500" /> {tool.rating.toFixed(1)}</span> | |
| <span className="rounded-full bg-white/70 px-2 py-0.5 font-medium text-slate-700 dark:bg-white/10 dark:text-white"> | |
| {tool.category} | |
| </span> | |
| </div> | |
| </Link> | |
| ))} | |
| </div> | |
| </div> | |
| ); | |
| } | |
Xet Storage Details
- Size:
- 2.06 kB
- Xet hash:
- 0cce44308ff0b10f09eea5849b6d6e46b0290323b5492a06d90dbf78ba89fb38
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.