This commit is contained in:
Maren Süwer
2019-02-01 11:09:07 +01:00
parent ba971beea3
commit b3a3162d34

View File

@@ -3,7 +3,7 @@ import * as React from "react";
import ReactDOM from "react-dom"; import ReactDOM from "react-dom";
import Modal from "./Modal"; import Modal from "./Modal";
type ButtonType = { type Button = {
label: string, label: string,
onClick: () => void | null onClick: () => void | null
}; };
@@ -11,11 +11,11 @@ type ButtonType = {
type Props = { type Props = {
title: string, title: string,
message: string, message: string,
buttons: ButtonType[] buttons: Button[]
}; };
class ConfirmAlert extends React.Component<Props> { class ConfirmAlert extends React.Component<Props> {
handleClickButton = (button: ButtonType) => { handleClickButton = (button: Button) => {
if (button.onClick) { if (button.onClick) {
button.onClick(); button.onClick();
} }