From f22174a77f883c1bcda96831c59d5e76d100abae Mon Sep 17 00:00:00 2001 From: shadcn Date: Wed, 29 Oct 2025 22:56:24 +0400 Subject: [PATCH] feat: add mcp config (#8641) --- apps/v4/components/directory-add-button.tsx | 44 ++++++++++++++++++++ apps/v4/components/directory-list.tsx | 46 ++++++++++++++------- 2 files changed, 75 insertions(+), 15 deletions(-) create mode 100644 apps/v4/components/directory-add-button.tsx diff --git a/apps/v4/components/directory-add-button.tsx b/apps/v4/components/directory-add-button.tsx new file mode 100644 index 0000000000..88787285cc --- /dev/null +++ b/apps/v4/components/directory-add-button.tsx @@ -0,0 +1,44 @@ +"use client" + +import { IconCheck } from "@tabler/icons-react" +import { toast } from "sonner" + +import { useCopyToClipboard } from "@/hooks/use-copy-to-clipboard" +import { Button } from "@/registry/new-york-v4/ui/button" + +export function DirectoryAddButton({ + registry, +}: { + registry: { + name: string + url: string + } +}) { + const { copyToClipboard, isCopied } = useCopyToClipboard() + return ( + + ) +} diff --git a/apps/v4/components/directory-list.tsx b/apps/v4/components/directory-list.tsx index 3ed8690432..15ded0f8a7 100644 --- a/apps/v4/components/directory-list.tsx +++ b/apps/v4/components/directory-list.tsx @@ -1,12 +1,15 @@ import * as React from "react" import { IconArrowUpRight } from "@tabler/icons-react" +import { DirectoryAddButton } from "@/components/directory-add-button" import registries from "@/registry/directory.json" +import { Button } from "@/registry/new-york-v4/ui/button" import { Item, ItemActions, ItemContent, ItemDescription, + ItemFooter, ItemGroup, ItemMedia, ItemSeparator, @@ -18,27 +21,40 @@ export function DirectoryList() { {registries.map((registry, index) => ( - + + + + {registry.name} + {registry.description && ( + + {registry.description} + + )} + + + + + + + + + - - - {registry.name} - {registry.description && ( - {registry.description} - )} - - - - + Visit {registry.name} {index < registries.length - 1 && }