Home / Function/ DialogCloseButton() — ui Function Reference

DialogCloseButton() — ui Function Reference

Architecture documentation for the DialogCloseButton() function in dialog-close-button.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  e420b97e_6c2d_30db_db09_ad36b594a743["DialogCloseButton()"]
  93859c1a_e000_d57a_ce41_68a5a9b3ab48["dialog-close-button.tsx"]
  e420b97e_6c2d_30db_db09_ad36b594a743 -->|defined in| 93859c1a_e000_d57a_ce41_68a5a9b3ab48
  style e420b97e_6c2d_30db_db09_ad36b594a743 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

deprecated/www/registry/new-york/examples/dialog-close-button.tsx lines 17–56

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

Frequently Asked Questions

What does DialogCloseButton() do?
DialogCloseButton() is a function in the ui codebase, defined in deprecated/www/registry/new-york/examples/dialog-close-button.tsx.
Where is DialogCloseButton() defined?
DialogCloseButton() is defined in deprecated/www/registry/new-york/examples/dialog-close-button.tsx at line 17.

Analyze Your Own Codebase

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

Try Supermodel Free