UNPKG

ds-smart-ui

Version:

Smart UI v1.0.5 — A production-ready React component library by PT Praisindo Teknologi. Covers inputs, navigation, data display, feedback, and layout with a unified design system, semantic Typography tokens, and full Storybook documentation.

48 lines (47 loc) 2.1 kB
import { default as React } from 'react'; import { ButtonRoundedTypes } from '../../../types/button-types'; type DialogActionVariant = "flashMessage" | "confirm"; type DialogActionRounded = "sm" | "md" | "lg" | "xl"; export interface DialogActionAction { /** Accent color of the action buttons. @default "danger" */ color?: "primary" | "success" | "warning" | "danger"; /** Border radius for the action buttons. @default "full" */ rounded?: ButtonRoundedTypes; /** Label for the confirm button. @default "Confirm" */ confirmText?: string; /** Label for the cancel button. @default "Cancel" */ closeText?: string; /** Whether the confirm button is in loading state. @default false */ isLoading?: boolean; /** Whether the confirm button is disabled. @default false */ disabled?: boolean; } export interface DialogActionProps { isOpen: boolean; onClose: () => void; onConfirm?: () => void; title: string; message: string; variant: DialogActionVariant; confirmButtonText?: string; closeButtonText?: string; color?: "primary" | "success" | "warning" | "danger"; rounded?: DialogActionRounded; closeOnOverlayClick?: boolean; id?: string; lockBodyScroll?: boolean; isLoading?: boolean; disabled?: boolean; /** Border radius for all buttons in the dialog. @default "full" */ buttonRounded?: ButtonRoundedTypes; /** Optional custom icon for the confirm badge. ReactNode — e.g. SVG sprite: <svg width="24" height="24" fill="currentColor"><use href="/assets/icons/material-outline.svg#delete" /></svg> */ icon?: React.ReactNode; /** When true, renders an animated Lottie icon instead of a static icon (flashMessage variant only). @default true */ animated?: boolean; /** Optional content to render below the description (e.g. for copy functionality) */ children?: React.ReactNode; /** Grouped action buttons styling & behavior configurations */ action?: DialogActionAction; } declare const DialogAction: React.FC<DialogActionProps>; export default DialogAction;