Home / Function/ DialogCloseButton() — supabase Function Reference

DialogCloseButton() — supabase Function Reference

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

Entity Profile

Relationship Graph

Source Code

apps/design-system/registry/default/example/dialog-close-button.tsx lines 18–58

export default function DialogCloseButton() {
  return (
    <Dialog>
      <DialogTrigger asChild>
        <Button type="default">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>
        <DialogSectionSeparator />
        <DialogSection>
          <div className="flex items-center space-x-2">
            <div className="grid flex-1 gap-2">
              <Label_Shadcn_ htmlFor="link" className="sr-only">
                Link
              </Label_Shadcn_>
              <Input_Shadcn_
                id="link"
                defaultValue="https://ui.shadcn.com/docs/installation"
                readOnly
              />
            </div>
            <Button htmlType="submit" size="small" type="secondary" className="px-3">
              <span className="sr-only">Copy</span>
              <Copy className="h-4 w-4" />
            </Button>
          </div>
        </DialogSection>
        <DialogFooter className="sm:justify-start">
          <DialogClose asChild>
            <Button type="default" htmlType="button">
              Custom Close Button
            </Button>
          </DialogClose>
        </DialogFooter>
      </DialogContent>
    </Dialog>
  )
}

Domain

Subdomains

Analyze Your Own Codebase

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

Try Supermodel Free