@robotical/sensors-dashboard
Version:
A dashboard tool for depicting Marty data by Robotical
24 lines (23 loc) • 999 B
TypeScript
import { ModalContentType, ModalEventTopics, ModalObservable, ModalObserver, ModalStateData } from "./ModalObserver";
type ModalReturnValue = any;
declare class ModalState implements ModalObservable {
modalContent: ModalContentType | null;
modalTitle: string;
private _observers;
private _modalPromise;
private _modalResolve;
private _modalReject;
constructor();
setModal(modalContent: ModalContentType, modalTitle: string, withLogo?: boolean): Promise<ModalReturnValue>;
closeModal(modalReturnValue?: ModalReturnValue, onCloseCb?: () => void): void;
updateModalProps(updatedProps: {
modalTitle?: string;
withCloseButton?: boolean;
}): void;
clearPromise(): void;
subscribe(observer: ModalObserver, topics: Array<ModalEventTopics>): void;
unsubscribe(observer: ModalObserver): void;
publish(eventTopic: ModalEventTopics, eventData?: ModalStateData): void;
}
declare const modalState: ModalState;
export default modalState;