sws-frontend
Version:
sws frontend project
39 lines (38 loc) • 963 B
TypeScript
/// <reference types="react" />
import * as React from "react";
import "./errormodal.css";
export declare type Error = {
name?: string;
message: string;
stack?: string;
stacktrace?: string;
};
export declare const makeError: (error: Error) => {
title: string;
subtitle: string;
details: string;
};
export declare const errorBuilder: (title?: string, subtitle?: string, details?: any, onHide?: any) => ErrorReport;
/** something is wrong, no much more. */
export declare const defaultError: {
title: string;
subtitle: string;
details: string;
};
export declare type ErrorReport = {
title: string;
subtitle: string;
details?: any;
onHide?: any;
};
export interface Props {
error: ErrorReport;
}
export interface State {
showDetails: boolean;
}
export default class ErrorModal extends React.Component<Props, State> {
constructor(props: any);
toggleDetails(): void;
render(): JSX.Element;
}