Home / File/ open-in-v0-button.tsx — ui Source File

open-in-v0-button.tsx — ui Source File

Architecture documentation for open-in-v0-button.tsx, a tsx file in the ui codebase. 3 imports, 0 dependents.

File tsx Internationalization Dictionary 3 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  d646db44_7fc5_83bc_a6f9_3cfbc9a31e0a["open-in-v0-button.tsx"]
  79081a1f_55a3_945a_fb8c_d53d6d3eab81["utils"]
  d646db44_7fc5_83bc_a6f9_3cfbc9a31e0a --> 79081a1f_55a3_945a_fb8c_d53d6d3eab81
  aae3c3f1_230a_9c11_a663_8bbc3f0ad054["icons"]
  d646db44_7fc5_83bc_a6f9_3cfbc9a31e0a --> aae3c3f1_230a_9c11_a663_8bbc3f0ad054
  57e86e45_ac6e_7278_be08_9092724e8401["button"]
  d646db44_7fc5_83bc_a6f9_3cfbc9a31e0a --> 57e86e45_ac6e_7278_be08_9092724e8401
  style d646db44_7fc5_83bc_a6f9_3cfbc9a31e0a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { cn } from "@/lib/utils"
import { Icons } from "@/components/icons"
import { Button } from "@/registry/new-york-v4/ui/button"

// v0 uses the default style.
const V0_STYLE = "new-york-v4"

export function OpenInV0Button({
  name,
  className,
  ...props
}: React.ComponentProps<typeof Button> & {
  name: string
}) {
  return (
    <Button
      size="sm"
      asChild
      className={cn("h-[1.8rem] gap-1", className)}
      {...props}
    >
      <a
        href={`${process.env.NEXT_PUBLIC_V0_URL}/chat/api/open?url=${process.env.NEXT_PUBLIC_APP_URL}/r/styles/${V0_STYLE}/${name}.json`}
        target="_blank"
      >
        Open in <Icons.v0 className="size-5" />
      </a>
    </Button>
  )
}

Subdomains

Functions

Dependencies

  • button
  • icons
  • utils

Frequently Asked Questions

What does open-in-v0-button.tsx do?
open-in-v0-button.tsx is a source file in the ui codebase, written in tsx. It belongs to the Internationalization domain, Dictionary subdomain.
What functions are defined in open-in-v0-button.tsx?
open-in-v0-button.tsx defines 1 function(s): OpenInV0Button.
What does open-in-v0-button.tsx depend on?
open-in-v0-button.tsx imports 3 module(s): button, icons, utils.
Where is open-in-v0-button.tsx in the architecture?
open-in-v0-button.tsx is located at apps/v4/components/open-in-v0-button.tsx (domain: Internationalization, subdomain: Dictionary, directory: apps/v4/components).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free