ui/alert-dialog.tsx

PageAI-Pro/page-ui · components/shared/ui/alert-dialog.tsx · typescript · MIT
ui

A reusable alert dialog component using Radix UI primitives for displaying critical messages that require user confirmation or acknowledgment.

// Source: https://github.com/PageAI-Pro/page-ui | License: MIT | Copyright 2024 Shipixen
// Provided via justclaw.it.com; keep this notice with the code.
'use client';

import * as React from 'react';
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';

import { cn } from '@/lib/utils';
import { buttonVariants } from 'components/shared/ui/button';

const AlertDialog = AlertDialogPrimitive.Root;

const AlertDialogTrigger = AlertDialogPrimitive.Trigger;

const AlertDialogPortal = AlertDialogPrimitive.Portal;

const AlertDialogOverlay = React.forwardRef<
  React.ElementRef<typeof AlertDialogPrimitive.Overlay>,
  React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>
>(({ className, children, ...props }, ref) => (
  <AlertDialogPrimitive.Overlay
    className={c

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

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

Get a free API key