"use client" import * as React from "react" import { CircleHelp, Info, Monitor, Phone, Smartphone, Tablet, } from "lucide-react" import { ImperativePanelHandle } from "react-resizable-panels" import { useConfig } from "@/hooks/use-config" import { BlockCopyCodeButton } from "@/components/block-copy-code-button" import { Icons } from "@/components/icons" import { StyleSwitcher } from "@/components/style-switcher" import { V0Button } from "@/components/v0-button" import { Badge } from "@/registry/new-york/ui/badge" import { Popover, PopoverContent, PopoverTrigger, } from "@/registry/new-york/ui/popover" import { ResizableHandle, ResizablePanel, ResizablePanelGroup, } from "@/registry/new-york/ui/resizable" import { Separator } from "@/registry/new-york/ui/separator" import { Tabs, TabsContent, TabsList, TabsTrigger, } from "@/registry/new-york/ui/tabs" import { ToggleGroup, ToggleGroupItem, } from "@/registry/new-york/ui/toggle-group" import { Block } from "@/registry/schema" export function BlockPreview({ block }: { block: Block }) { const [config] = useConfig() const [isLoading, setIsLoading] = React.useState(true) const ref = React.useRef(null) if (config.style !== block.style) { return null } return (
Preview Code
{block.code && (
{ if (ref.current) { ref.current.resize(parseInt(value)) } }} >
Block description

What is the difference between the New York and Default style?

A style comes with its own set of components, animations, icons and more.

The Default style has larger inputs, uses lucide-react for icons and tailwindcss-animate for animations.

The New York style ships with smaller buttons and inputs. It also uses shadows on cards and buttons.

)}
{isLoading ? (
Loading...
) : null}