/** * Copyright (c) 2018 Dell Inc., or its subsidiaries. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 */ import * as React from "react"; import { ReactNode } from "react"; /** * @param {isOpen} property stating if modal open * @param {size} size of modal * @param {title} title of modal * @param {closable} property stating if modal is closable * @param {onClose} function onClose * @param {dataqa} Quality Engineering field * @param {width} if Size is custom, then width need to be provided in props * @param {height} if Size is custom, then height need to be provided in props * @param {className} if className is provided, the add custom class with existing classes * @param {type} if type is provided, modal rendered will be of given type * @param {showIcon} by defualt it is true if type is provided, make it false to not show icon * @param {customIcon} sets custom icons to modal title */ declare type ModalProps = { isOpen?: boolean; size?: ModalSize; title?: string; closable?: boolean; onClose?: Function; dataqa?: string; width?: number; height?: number; className?: string; type?: ModalType; showIcon?: boolean; customIcon?: React.ReactNode; }; declare type ModalState = { isOpen: boolean; }; export declare enum ModalSize { SMALL = "modal-sm", LARGE = "modal-lg", XLARGE = "modal-xl", CUSTOM = "custom" } export declare enum ModalType { INFO = "modal-type-info", WARNING = "modal-type-warning", DANGER = "modal-type-danger", DEFAULT = "modal-type-default" } export declare const ModalBody: React.FunctionComponent; export declare const ModalFooter: React.FunctionComponent; export declare class Modal extends React.PureComponent { private divRef; state: ModalState; componentWillUpdate(nextProps: ModalProps, nextState: ModalState): void; componentWillMount(): void; createDivRef(): void; cleanup(): void; componentWillUnmount(): void; getTitleIconByType(type: ModalType | undefined): React.ReactNode; buildModalTitle(): React.ReactElement; buildModal(): React.ReactElement; close(): void; open(): void; isOpen(props?: Readonly & Readonly<{ children?: React.ReactNode; }>, state?: ModalState): boolean; render(): ReactNode; } export {};