MCPcopy Create free account
hub / github.com/R44VC0RP/opencode.cafe / DialogContent

Function DialogContent

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

Source from the content-addressed store, hash-verified

49}
50
51function DialogContent({
52 className,
53 children,
54 showCloseButton = true,
55 ...props
56}: React.ComponentProps<typeof DialogPrimitive.Content> & {
57 showCloseButton?: boolean
58}) {
59 return (
60 <DialogPortal data-slot="dialog-portal">
61 <DialogOverlay />
62 <DialogPrimitive.Content
63 data-slot="dialog-content"
64 className={cn(
65 "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4",
66 "rounded-md border border-[var(--color-border)] bg-[var(--color-bg)] p-6",
67 "shadow-[0_10px_40px_rgba(0,0,0,0.2)] dark:shadow-[0_10px_40px_rgba(0,0,0,0.5)]",
68 "data-[state=open]:animate-in data-[state=closed]:animate-out",
69 "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
70 "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
71 "duration-200 outline-none",
72 className
73 )}
74 {...props}
75 >
76 {children}
77 {showCloseButton && (
78 <DialogPrimitive.Close
79 data-slot="dialog-close"
80 className={cn(
81 "absolute right-4 top-4 rounded-sm opacity-70 transition-opacity",
82 "hover:opacity-100 focus:outline-none",
83 "disabled:pointer-events-none",
84 "text-[var(--color-text-weak)]"
85 )}
86 >
87 <XIcon className="size-4" />
88 <span className="sr-only">Close</span>
89 </DialogPrimitive.Close>
90 )}
91 </DialogPrimitive.Content>
92 </DialogPortal>
93 )
94}
95
96function DialogHeader({ className, ...props }: React.ComponentProps<"div">) {
97 return (

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected