Home / File/ dialog-close-button.tsx — ui Source File

dialog-close-button.tsx — ui Source File

Architecture documentation for dialog-close-button.tsx, a tsx file in the ui codebase. 5 imports, 0 dependents.

File tsx ComponentRegistry ChartRegistry 5 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  537e1cc7_e2a7_9c50_d3bd_c5393493c4e3["dialog-close-button.tsx"]
  d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3["lucide-react"]
  537e1cc7_e2a7_9c50_d3bd_c5393493c4e3 --> d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3
  d418ad18_b947_f4e5_6e4c_01100d7a63e4["button"]
  537e1cc7_e2a7_9c50_d3bd_c5393493c4e3 --> d418ad18_b947_f4e5_6e4c_01100d7a63e4
  885f582a_05b5_deff_0779_e9bfb6fad47b["dialog"]
  537e1cc7_e2a7_9c50_d3bd_c5393493c4e3 --> 885f582a_05b5_deff_0779_e9bfb6fad47b
  163b5f6f_1cd3_6d8d_5305_80eec4895f60["input"]
  537e1cc7_e2a7_9c50_d3bd_c5393493c4e3 --> 163b5f6f_1cd3_6d8d_5305_80eec4895f60
  f826d306_7d63_5ba3_6a53_387904d37a9f["label"]
  537e1cc7_e2a7_9c50_d3bd_c5393493c4e3 --> f826d306_7d63_5ba3_6a53_387904d37a9f
  style 537e1cc7_e2a7_9c50_d3bd_c5393493c4e3 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { Copy } from "lucide-react"

import { Button } from "@/registry/default/ui/button"
import {
  Dialog,
  DialogClose,
  DialogContent,
  DialogDescription,
  DialogFooter,
  DialogHeader,
  DialogTitle,
  DialogTrigger,
} from "@/registry/default/ui/dialog"
import { Input } from "@/registry/default/ui/input"
import { Label } from "@/registry/default/ui/label"

export default function DialogCloseButton() {
  return (
    <Dialog>
      <DialogTrigger asChild>
        <Button variant="outline">Share</Button>
      </DialogTrigger>
      <DialogContent className="sm:max-w-md">
        <DialogHeader>
          <DialogTitle>Share link</DialogTitle>
          <DialogDescription>
            Anyone who has this link will be able to view this.
          </DialogDescription>
        </DialogHeader>
        <div className="flex items-center space-x-2">
          <div className="grid flex-1 gap-2">
            <Label htmlFor="link" className="sr-only">
              Link
            </Label>
            <Input
              id="link"
              defaultValue="https://ui.shadcn.com/docs/installation"
              readOnly
            />
          </div>
          <Button type="submit" size="sm" className="px-3">
            <span className="sr-only">Copy</span>
            <Copy />
          </Button>
        </div>
        <DialogFooter className="sm:justify-start">
          <DialogClose asChild>
            <Button type="button" variant="secondary">
              Close
            </Button>
          </DialogClose>
        </DialogFooter>
      </DialogContent>
    </Dialog>
  )
}

Subdomains

Dependencies

  • button
  • dialog
  • input
  • label
  • lucide-react

Frequently Asked Questions

What does dialog-close-button.tsx do?
dialog-close-button.tsx is a source file in the ui codebase, written in tsx. It belongs to the ComponentRegistry domain, ChartRegistry subdomain.
What functions are defined in dialog-close-button.tsx?
dialog-close-button.tsx defines 1 function(s): DialogCloseButton.
What does dialog-close-button.tsx depend on?
dialog-close-button.tsx imports 5 module(s): button, dialog, input, label, lucide-react.
Where is dialog-close-button.tsx in the architecture?
dialog-close-button.tsx is located at deprecated/www/registry/default/examples/dialog-close-button.tsx (domain: ComponentRegistry, subdomain: ChartRegistry, directory: deprecated/www/registry/default/examples).

Analyze Your Own Codebase

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

Try Supermodel Free