Files
upstream-shadcn-ui/apps/v4/components/designer-actions.tsx
upstream-mirror 1416db152c
All checks were successful
Release / Create Version PR or Publish Stable Release (push) Has been skipped
Release / Publish Prerelease to NPM (push) Has been skipped
Monitor Registries / Monitor registry health (push) Has been skipped
snapshot of https://github.com/shadcn-ui/ui.git (main, 2026-09-15; blobs > 131072B omitted)
2026-09-15 22:44:43 +05:00

40 lines
1.2 KiB
TypeScript

"use client"
import { Suspense } from "react"
import { usePathname } from "next/navigation"
import { Separator } from "@/registry/new-york-v4/ui/separator"
import { ProjectForm } from "@/app/(app)/(create)/components/project-form"
import { V0Button } from "@/app/(app)/(create)/components/v0-button"
export function DesignerActions() {
const pathname = usePathname()
// Typeset carries its own docs panel; the header stays clean. A route gate
// on purpose: two designer pages don't justify a slot protocol. Revisit if
// a third appears.
if (pathname === "/typeset") {
return null
}
return (
<>
<div className="hidden items-center gap-2 group-has-data-[slot=designer]/layout:md:flex">
<Separator orientation="vertical" />
<Suspense fallback={null}>
<V0Button />
</Suspense>
<Suspense fallback={null}>
<ProjectForm />
</Suspense>
</div>
<div className="hidden items-center gap-2 group-has-data-[slot=designer]/layout:flex group-has-data-[slot=designer]/layout:md:hidden">
<Separator orientation="vertical" />
<Suspense fallback={null}>
<V0Button />
</Suspense>
</div>
</>
)
}