ui/dialog.tsx

Autonomous-Company · dashboard/ui/src/components/ui/dialog.tsx · typescript · MIT
ui

Reusable modal dialog wrapper with accessible primitives.

// Source: https://github.com/MaxMiksa/Autonomous-Company | License: MIT | Copyright 2026 jinmingyang
// Provided via justclaw.it.com; keep this notice with the code.
"use client"

import * as React from "react"
import { cn } from "@/lib/utils"
import { XIcon } from "lucide-react"
import { Dialog as DialogPrimitive } from "radix-ui"

import { Button } from "@/components/ui/button"

function Dialog({
  ...props
}: React.ComponentProps<typeof DialogPrimitive.Root>) {
  return <DialogPrimitive.Root data-slot="dialog" {...props} />
}

function DialogTrigger({
  ...props
}: React.ComponentProps<typeof DialogPrimitive.Trigger>) {
  return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />
}

function DialogPortal({
  ...props
}: React.ComponentProps<typeof DialogPrimitive.Portal>)

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key