MCPcopy Create free account
hub / github.com/AutoForgeAI/autoforge / DialogContent

Function DialogContent

ui/src/components/ui/dialog.tsx:48–80  ·  view source on GitHub ↗
({
  className,
  children,
  showCloseButton = true,
  ...props
}: React.ComponentProps<typeof DialogPrimitive.Content> & {
  showCloseButton?: boolean
})

Source from the content-addressed store, hash-verified

46}
47
48function DialogContent({
49 className,
50 children,
51 showCloseButton = true,
52 ...props
53}: React.ComponentProps<typeof DialogPrimitive.Content> & {
54 showCloseButton?: boolean
55}) {
56 return (
57 <DialogPortal data-slot="dialog-portal">
58 <DialogOverlay />
59 <DialogPrimitive.Content
60 data-slot="dialog-content"
61 className={cn(
62 "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] max-h-[calc(100vh-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none overflow-y-auto sm:max-w-lg",
63 className
64 )}
65 {...props}
66 >
67 {children}
68 {showCloseButton && (
69 <DialogPrimitive.Close
70 data-slot="dialog-close"
71 className="ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
72 >
73 <XIcon />
74 <span className="sr-only">Close</span>
75 </DialogPrimitive.Close>
76 )}
77 </DialogPrimitive.Content>
78 </DialogPortal>
79 )
80}
81
82function DialogHeader({ className, ...props }: React.ComponentProps<"div">) {
83 return (

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected