mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-06-24 21:25:55 +00:00
* feat: add field.tsx and update blocks * feat: add input group * feat: implement button group * fix * fix * wip * fix: button group * feat: update field * fix * feat * feat: cooked * fix * chore: build registry * feat: add kbd component * chore: update input group demo * feat: update kbd component * feat: add empty * feat: add spinner * refactor: input group * feat: blocks * fix * fix: app sidebar * feat: add label to app sidebar * fix * fix * fix * fix * fix * feat * feat * fix * docs: button group * feat: add docs * docs: kbd * docs: empty * fix * docs * docs * feat: add sink link * fix * fix * docs * feat: add new page * fix * fix * fix * fix * fix * fix * feat: add registration form * fix: chat settings * fix * fix preview * fix examples * feat: add changelog * fix * fix * fix * fix * fix * feat(www): add t3 versions * chore: build registry * fix * fix * fix * feat: inline code examples for llm * fix * feat: home * fix * fix * fix * fix * fix * chore: changelog * fix * fix * fix * fix: callout * fix
39 lines
1014 B
TypeScript
39 lines
1014 B
TypeScript
import Link from "next/link"
|
|
|
|
import { PAGES_NEW } from "@/lib/docs"
|
|
import { source } from "@/lib/source"
|
|
|
|
export function ComponentsList() {
|
|
const components = source.pageTree.children.find(
|
|
(page) => page.$id === "components"
|
|
)
|
|
|
|
if (components?.type !== "folder") {
|
|
return
|
|
}
|
|
|
|
const list = components.children.filter(
|
|
(component) => component.type === "page"
|
|
)
|
|
|
|
return (
|
|
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2 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>
|
|
)
|
|
}
|