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