PromucFlow_constructor/app/client/src/widgets/AlertWidget.tsx

30 lines
738 B
TypeScript
Raw Normal View History

2019-09-12 08:11:25 +00:00
import React from "react";
import BaseWidget, { IWidgetProps, IWidgetState } from "./BaseWidget";
import { WidgetType } from "../constants/WidgetConstants";
2019-09-12 12:19:46 +00:00
import { ActionPayload } from '../constants/ActionConstants';
2019-09-12 08:11:25 +00:00
class AlertWidget extends BaseWidget<AlertWidgetProps, IWidgetState> {
getPageView() {
return (
<div/>
);
}
getWidgetType(): WidgetType {
return "ALERT_WIDGET";
}
}
export type AlertType = "DIALOG" | "NOTIFICATION"
export type MessageIntent = "SUCCESS" | "ERROR" | "INFO" | "WARNING"
export interface AlertWidgetProps extends IWidgetProps {
alertType: AlertType
intent: MessageIntent
header: string
message: string
2019-09-12 12:19:46 +00:00
onPrimaryClick: ActionPayload[]
2019-09-12 08:11:25 +00:00
}
export default AlertWidget;