alert-dialog
nrjdalal/alert-dialogFreeComponent
acme publishes no description for this item.
Install it
npx shadcn@latest add https://nrjdalal.dev/r/alert-dialog.jsonSource
1"use client"23import { buttonVariants } from "@/components/ui/button"4import { cn } from "@/lib/utils"5import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog"6import * as React from "react"78function AlertDialog({9 ...props10}: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {11 return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />12}1314function AlertDialogTrigger({15 ...props16}: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {17 return (18 <AlertDialogPrimitive.Trigger data-slot="alert-dialog-trigger" {...props} />19 )20}2122function AlertDialogPortal({23 ...props24}: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {25 return (26 <AlertDialogPrimitive.Portal data-slot="alert-dialog-portal" {...props} />27 )28}2930function AlertDialogOverlay({31 className,32 ...props33}: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {34 return (35 <AlertDialogPrimitive.Overlay36 data-slot="alert-dialog-overlay"37 className={cn(38 "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",39 className,40 )}41 {...props}42 />43 )44}4546function AlertDialogContent({47 className,48 ...props49}: React.ComponentProps<typeof AlertDialogPrimitive.Content>) {50 return (51 <AlertDialogPortal>52 <AlertDialogOverlay />53 <AlertDialogPrimitive.Content54 data-slot="alert-dialog-content"55 className={cn(56 "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)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",57 className,58 )}59 {...props}60 />61 </AlertDialogPortal>62 )63}6465function AlertDialogHeader({66 className,67 ...props68}: React.ComponentProps<"div">) {69 return (70 <div71 data-slot="alert-dialog-header"72 className={cn("flex flex-col gap-2 text-center sm:text-left", className)}73 {...props}74 />75 )76}7778function AlertDialogFooter({79 className,80 ...props81}: React.ComponentProps<"div">) {82 return (83 <div84 data-slot="alert-dialog-footer"85 className={cn(86 "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",87 className,88 )}89// … truncated
What it pulls in
npm packages
Files it writes
More from acme
All 49 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| accordionaccordion | acme | Components | Free | 5 deps · 2 files | |
| alertalert | acme | Components | Free | 4 deps · 2 files | |
| aspect-ratioaspect-ratio | acme | Components | Free | 1 dep | |
| avataravatar | acme | Components | Free | 4 deps · 2 files | |
| badgebadge | acme | Components | Free | 5 deps · 2 files | |
| breadcrumbbreadcrumb | acme | Components | Free | 5 deps · 2 files | |
| buttonbutton | acme | Components | Free | 5 deps · 2 files | |
| calendarcalendar | acme | Components | Free | 7 deps · 3 files |
