primitives/dialog.tsx

relivator · src/ui/primitives/dialog.tsx · typescript · MIT
ui

A reusable Radix Dialog wrapper with styled components for React applications.

// Source: https://github.com/reliverse/relivator | License: MIT | Copyright 2025 Nazar Kornienko (blefnk), Reliverse
// Provided via justclaw.it.com; keep this notice with the code.
"use client";

import type * as React from "react";

import * as DialogPrimitive from "@radix-ui/react-dialog";
import { XIcon } from "lucide-react";

import { cn } from "~/lib/cn";

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

function DialogClose({
  ...props
}: React.ComponentProps<typeof DialogPrimitive.Close>) {
  return <DialogPrimitive.Close data-slot="dialog-close" {...props} />;
}

function DialogContent({
  children,
  className,
  ...props
}: React.ComponentProps<typeof DialogPrimitive.Content

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

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

Get a free API key