primevue-mirror/components/lib/confirmationoptions/ConfirmationOptions.d.ts

100 lines
2.6 KiB
TypeScript
Raw Normal View History

/**
*
* [Live Demo](https://www.primevue.org/confirmdialog/)
*
* @module confirmationoptions
*
*/
import { ButtonProps } from '../button';
2022-09-06 12:03:37 +00:00
/**
* Confirmation Service options.
*/
2022-09-06 12:03:37 +00:00
export interface ConfirmationOptions {
/**
* Element to align the overlay.
*/
target?: HTMLElement | undefined;
/**
* Header text of the dialog.
*/
header?: string | undefined;
/**
* Message of the confirmation.
*/
message?: string | undefined;
/**
* Optional key to match the key of the confirmation, useful to target a specific confirm dialog instance.
*/
group?: string | undefined;
/**
* Position of the dialog.
2023-03-08 10:51:52 +00:00
* @defaultValue center
2022-09-06 12:03:37 +00:00
*/
position?: 'center' | 'top' | 'bottom' | 'left' | 'right' | 'topleft' | 'topright' | 'bottomleft' | 'bottomright' | undefined;
2022-09-06 12:03:37 +00:00
/**
* Icon to display next to the message.
*/
icon?: string | undefined;
/**
* Whether background scroll should be blocked when dialog is visible.
2023-03-10 14:00:58 +00:00
* @defaultValue false
2022-09-06 12:03:37 +00:00
*/
blockScroll?: boolean | undefined;
/**
* Callback to execute when action is confirmed.
2023-03-07 13:37:45 +00:00
* @todo Next release should be able to change
2022-09-06 12:03:37 +00:00
*/
2023-03-07 13:37:45 +00:00
accept?: () => void;
2022-09-06 12:03:37 +00:00
/**
* Callback to execute when action is rejected.
*/
2023-11-13 11:25:33 +00:00
reject?: () => void;
2023-11-13 11:27:37 +00:00
/**
* Callback to execute when dialog is visible.
*/
onShow?: () => void;
2022-09-14 11:26:01 +00:00
/**
* Callback to execute when dialog is hidden.
*/
2023-03-07 13:37:45 +00:00
onHide?: () => void;
2022-09-06 12:03:37 +00:00
/**
* Label of the accept button. Defaults to PrimeVue Locale configuration.
*/
acceptLabel?: string | undefined;
/**
* Label of the reject button. Defaults to PrimeVue Locale configuration.
*/
rejectLabel?: string | undefined;
/**
* Icon of the accept button.
*/
acceptIcon?: string | undefined;
/**
* Icon of the reject button.
*/
rejectIcon?: string | undefined;
/**
* Style class of the accept button.
*/
acceptClass?: string | undefined;
/**
* Style class of the reject button.
*/
rejectClass?: string | undefined;
/**
* Element to receive the focus when the dialog gets visible, valid values are "accept" and "reject".
*/
defaultFocus?: string | undefined;
/**
* Used to pass all properties of the ButtonProps to the reject button inside the component.
* @type {ButtonProps}
*/
rejectProps?: object | undefined;
/**
* Used to pass all properties of the ButtonProps to the accept button inside the component.
* @type {ButtonProps}
*/
acceptProps?: object | undefined;
2022-09-06 12:03:37 +00:00
}