UNPKG

1.83 kBTypeScriptView Raw
1import type { CSSProperties, TeleportProps } from 'vue';
2import type { Interceptor, Numeric } from '../utils';
3export type DialogTheme = 'default' | 'round-button';
4export type DialogAction = 'confirm' | 'cancel';
5export type DialogMessage = string | (() => JSX.Element);
6export type DialogMessageAlign = 'left' | 'center' | 'right' | 'justify';
7export type DialogOptions = {
8 title?: string;
9 width?: Numeric;
10 theme?: DialogTheme;
11 message?: DialogMessage;
12 overlay?: boolean;
13 teleport?: TeleportProps['to'];
14 className?: unknown;
15 allowHtml?: boolean;
16 lockScroll?: boolean;
17 transition?: string;
18 beforeClose?: Interceptor;
19 messageAlign?: DialogMessageAlign;
20 overlayClass?: string;
21 overlayStyle?: CSSProperties;
22 closeOnPopstate?: boolean;
23 showCancelButton?: boolean;
24 showConfirmButton?: boolean;
25 cancelButtonText?: string;
26 cancelButtonColor?: string;
27 cancelButtonDisabled?: boolean;
28 confirmButtonText?: string;
29 confirmButtonColor?: string;
30 confirmButtonDisabled?: boolean;
31 closeOnClickOverlay?: boolean;
32};
33export type DialogThemeVars = {
34 dialogWidth?: string;
35 dialogSmallScreenWidth?: string;
36 dialogFontSize?: string;
37 dialogTransition?: string;
38 dialogRadius?: string;
39 dialogBackground?: string;
40 dialogHeaderFontWeight?: string;
41 dialogHeaderLineHeight?: number | string;
42 dialogHeaderPaddingTop?: string;
43 dialogHeaderIsolatedPadding?: string;
44 dialogMessagePadding?: string;
45 dialogMessageFontSize?: string;
46 dialogMessageLineHeight?: number | string;
47 dialogMessageMaxHeight?: string;
48 dialogHasTitleMessageTextColor?: string;
49 dialogHasTitleMessagePaddingTop?: string;
50 dialogButtonHeight?: string;
51 dialogRoundButtonHeight?: string;
52 dialogConfirmButtonTextColor?: string;
53};
54
\No newline at end of file