@nexusui/components
Version:
These are custom components specially-developed for NexusUI applications. They will make your life easier by giving you out-of-the-box implementations for various high-level UI elements that you can drop directly into your application.
37 lines (36 loc) • 1.59 kB
TypeScript
import type { DialogProps } from './Dialog.container';
import { ButtonPropsWithTestId } from '../models/MuiExtension.type';
export interface ConfirmationDialogProps extends Omit<DialogProps, 'leftActions' | 'rightActions' | 'variant'> {
/**
* Callback fired when the user click on the cancel button.
* If you don't customize the cancel action, it is a quick prop to handle the click of the cancel button.
*
*/
onCancel?: () => void;
/**
* Callback fired when the user click on the confirm button
* If you don't customize the confirmation action, it is a quick prop to handle the click of the confirm button.
*/
onConfirm?: () => void;
/**
* Confirm action is a button on the footer right side,
* It is the Confirmation action of the dialog, It is the action that the user is expected to do
* @default { children: 'Confirm', variant: 'contained' }
* @type ButtonProps
*/
confirmAction?: ButtonPropsWithTestId;
/**
* Cancel action is a button on the footer right side,
* It is the cancel action of the dialog, it is the action that the user click cancel
* @default { children: 'Cancel' }
* @type ButtonProps
*/
cancelAction?: ButtonPropsWithTestId;
/**
* Extra action is a button on the footer left side, only you pass it this button will be rendered
* @default null
* @type ButtonProps
*/
extraAction?: ButtonPropsWithTestId;
}
export declare const ConfirmationDialog: (props: ConfirmationDialogProps) => import("react/jsx-runtime").JSX.Element;