mirror of
https://github.com/hanzoai/shadcn.git
synced 2026-10-30 18:22:59 +00:00
Squash merge of shadcn-ui/ui main branch into hanzo/ui, bringing in: - [email protected] through [email protected] releases - New apps/v4 directory structure - Registry system improvements and MCP server - Framework support (Vue, Svelte, React Native) - New templates (vite-app, monorepo-next, laravel) - Zod 4 compatibility (scoped override for zod@>4) - Test fixture corrections for alias resolution All 867 merge conflicts resolved preserving Hanzo customizations. 1020/1020 shadcn tests pass.
35 lines
956 B
TypeScript
35 lines
956 B
TypeScript
import Link from "next/link"
|
|
|
|
import { PAGES_NEW } from "@/lib/docs"
|
|
import { getPagesFromFolder, type PageTreeFolder } from "@/lib/page-tree"
|
|
|
|
export function ComponentsList({
|
|
componentsFolder,
|
|
currentBase,
|
|
}: {
|
|
componentsFolder: PageTreeFolder
|
|
currentBase: string
|
|
}) {
|
|
const list = getPagesFromFolder(componentsFolder, currentBase)
|
|
|
|
return (
|
|
<div className="grid grid-cols-2 gap-4 md:grid-cols-3 md:gap-x-8 lg:gap-x-16 lg:gap-y-6 xl:gap-x-20">
|
|
{list.map((component) => (
|
|
<Link
|
|
key={component.$id}
|
|
href={component.url}
|
|
className="inline-flex items-center gap-2 text-lg font-medium underline-offset-4 hover:underline md:text-base"
|
|
>
|
|
{component.name}
|
|
{PAGES_NEW.includes(component.url) && (
|
|
<span
|
|
className="flex size-2 rounded-full bg-blue-500"
|
|
title="New"
|
|
/>
|
|
)}
|
|
</Link>
|
|
))}
|
|
</div>
|
|
)
|
|
}
|