@loadsmart/miranda-wc
Version:
Miranda Web Components component library
41 lines (40 loc) • 1.27 kB
TypeScript
export declare const DIALOG_SIZES: readonly ["small", "medium", "large", "extra-large", "full-page"];
export type DialogSize = (typeof DIALOG_SIZES)[number];
export declare const DIALOG_VARIANTS: readonly ["neutral", "success", "warning", "danger"];
export type DialogVariant = (typeof DIALOG_VARIANTS)[number];
export interface DialogProps {
/**
* Determine if the dialog is open or closed
*/
open?: boolean;
/**
* Determines the size of the dialog
*/
size?: DialogSize;
/**
* Determines the style of the dialog
*/
variant?: DialogVariant;
/**
* Event handler for closing the dialog.
* we cannot expose this one because it clashes with the global 'close' event.
*
* Leaving this here for awareness.
*/
/**
* Event handler for when the dialog is opening.
*/
onopening?: (event: CustomEvent) => void;
/**
* Event handler for when the dialog has just been opened.
*/
onopened?: (event: CustomEvent) => void;
/**
* Event handler for when the dialog is closing.
*/
onclosing?: (event: CustomEvent) => void;
/**
* Event handler for when the dialog has just been closed.
*/
onclosed?: (event: CustomEvent) => void;
}