Israel Lavi | 1994c98 | 2018-05-21 17:42:00 +0300 | [diff] [blame] | 1 | import { Placement } from "../../common/enums"; |
| 2 | |
| 3 | export interface IModalConfig { |
| 4 | size?: string; // xl|l|md|sm|xsm |
| 5 | title?: string; |
| 6 | message?: string; |
| 7 | buttons?: IModalButtonComponent[]; |
| 8 | testId?: string; |
| 9 | type?: string; // 'info|error|alert'; |
| 10 | } |
| 11 | |
| 12 | export interface IButtonComponent { |
| 13 | text: string; |
| 14 | disabled?: boolean; |
| 15 | type?: string; |
| 16 | testId?: string; |
| 17 | preventDoubleClick?: boolean; |
| 18 | icon_name?: string; |
| 19 | icon_position?: string; |
| 20 | show_spinner?: boolean; |
| 21 | spinner_position?: Placement; |
| 22 | size?: string; |
| 23 | } |
| 24 | |
| 25 | export interface IModalButtonComponent extends IButtonComponent{ |
| 26 | id?: string; |
| 27 | callback?: Function; |
| 28 | closeModal?: boolean; |
| 29 | } |
| 30 | |
| 31 | export enum ModalType { |
| 32 | alert = "alert", |
| 33 | error = "error", |
| 34 | standard = "info", |
| 35 | custom = "custom" |
| 36 | } |
| 37 | |
| 38 | export enum ModalSize { |
| 39 | xlarge = "xl", |
| 40 | large = "l", |
| 41 | medium = "md", |
| 42 | small = "sm", |
| 43 | xsmall = "xsm" |
| 44 | } |