Home / File/ dialog-demo.tsx — ui Source File

dialog-demo.tsx — ui Source File

Architecture documentation for dialog-demo.tsx, a tsx file in the ui codebase. 4 imports, 1 dependents.

File tsx DocumentationAtlas Changelog 4 imports 1 dependents 4 functions

Entity Profile

Dependency Diagram

graph LR
  e4b1833d_78ba_c075_e3db_d6f5313c227b["dialog-demo.tsx"]
  57e86e45_ac6e_7278_be08_9092724e8401["button"]
  e4b1833d_78ba_c075_e3db_d6f5313c227b --> 57e86e45_ac6e_7278_be08_9092724e8401
  0896a8fa_5462_a73a_5add_fb8176921778["dialog"]
  e4b1833d_78ba_c075_e3db_d6f5313c227b --> 0896a8fa_5462_a73a_5add_fb8176921778
  80cf663d_a411_487c_d69e_ac9d405cd2ec["input"]
  e4b1833d_78ba_c075_e3db_d6f5313c227b --> 80cf663d_a411_487c_d69e_ac9d405cd2ec
  d752035b_6ed3_c6ef_e27c_eef51af9ec8d["label"]
  e4b1833d_78ba_c075_e3db_d6f5313c227b --> d752035b_6ed3_c6ef_e27c_eef51af9ec8d
  1c2403dc_4584_9f39_4e98_855a7de18bd1["component-registry.ts"]
  1c2403dc_4584_9f39_4e98_855a7de18bd1 --> e4b1833d_78ba_c075_e3db_d6f5313c227b
  style e4b1833d_78ba_c075_e3db_d6f5313c227b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

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

export function DialogDemo() {
  return (
    <div className="flex flex-col items-start gap-4 md:flex-row">
      <DialogWithForm />
      <DialogScrollableContent />
      <DialogWithStickyFooter />
    </div>
  )
}

function DialogWithForm() {
  return (
    <Dialog>
      <form>
        <DialogTrigger asChild>
          <Button variant="outline">Edit Profile</Button>
        </DialogTrigger>
        <DialogContent className="sm:max-w-[425px]">
          <DialogHeader>
            <DialogTitle>Edit profile</DialogTitle>
            <DialogDescription>
              Make changes to your profile here. Click save when you&apos;re
              done.
            </DialogDescription>
          </DialogHeader>
          <div className="grid gap-4">
            <div className="grid gap-3">
              <Label htmlFor="name-1">Name</Label>
              <Input id="name-1" name="name" defaultValue="Pedro Duarte" />
            </div>
            <div className="grid gap-3">
              <Label htmlFor="username-1">Username</Label>
              <Input id="username-1" name="username" defaultValue="@peduarte" />
            </div>
          </div>
          <DialogFooter>
            <DialogClose asChild>
              <Button variant="outline">Cancel</Button>
            </DialogClose>
            <Button type="submit">Save changes</Button>
          </DialogFooter>
        </DialogContent>
      </form>
    </Dialog>
  )
}
// ... (70 more lines)

Subdomains

Dependencies

  • button
  • dialog
  • input
  • label

Frequently Asked Questions

What does dialog-demo.tsx do?
dialog-demo.tsx is a source file in the ui codebase, written in tsx. It belongs to the DocumentationAtlas domain, Changelog subdomain.
What functions are defined in dialog-demo.tsx?
dialog-demo.tsx defines 4 function(s): DialogDemo, DialogScrollableContent, DialogWithForm, DialogWithStickyFooter.
What does dialog-demo.tsx depend on?
dialog-demo.tsx imports 4 module(s): button, dialog, input, label.
What files import dialog-demo.tsx?
dialog-demo.tsx is imported by 1 file(s): component-registry.ts.
Where is dialog-demo.tsx in the architecture?
dialog-demo.tsx is located at apps/v4/app/(internal)/sink/components/dialog-demo.tsx (domain: DocumentationAtlas, subdomain: Changelog, directory: apps/v4/app/(internal)/sink/components).

Analyze Your Own Codebase

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

Try Supermodel Free