UNPKG

@szum-tech/design-system

Version:

Szum-Tech design system with tailwindcss support

39 lines (36 loc) 2.35 kB
import { cn } from './chunk-ZD2QRAOX.js'; import { AlertDialog as AlertDialog$1 } from 'radix-ui'; import { jsxs, jsx } from 'react/jsx-runtime'; import { twMerge } from 'tailwind-merge'; var AlertDialog = AlertDialog$1.Root; var AlertDialogTrigger = AlertDialog$1.Trigger; function AlertDialogContent({ className, ...props }) { return /* @__PURE__ */ jsxs(AlertDialog$1.Portal, { children: [ /* @__PURE__ */ jsx(AlertDialog$1.Overlay, { className: "bg-app-background/80 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 backdrop-blur-xs" }), /* @__PURE__ */ jsx( AlertDialog$1.Content, { className: cn( "bg-app-foreground 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 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed top-1/2 left-1/2 z-50 flex w-full max-w-lg -translate-x-1/2 -translate-y-1/2 flex-col rounded border border-gray-800 p-4 shadow-lg duration-200", className ), ...props } ) ] }); } var AlertDialogAction = AlertDialog$1.Action; function AlertDialogFooter({ className, ...props }) { return /* @__PURE__ */ jsx("div", { className: twMerge("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className), ...props }); } function AlertDialogTitle({ className, ref, ...props }) { return /* @__PURE__ */ jsx(AlertDialog$1.Title, { ref, className: cn("text-heading-6", className), ...props }); } function AlertDialogDescription({ className, ...props }) { return /* @__PURE__ */ jsx(AlertDialog$1.Description, { className: cn("text-body-2 text-gray-300", className), ...props }); } var AlertDialogCancel = AlertDialog$1.Cancel; function AlertDialogHeader({ className, ...props }) { return /* @__PURE__ */ jsx("div", { className: cn("mb-4 flex flex-col space-y-2 text-center sm:text-left", className), ...props }); } export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger };