30 lines
694 B
TypeScript
30 lines
694 B
TypeScript
import { Button, DialogActions } from "@material-ui/core";
|
|
import ButtonWithSpinner from "./ButtonWithSpinner";
|
|
import React from "react";
|
|
|
|
interface DialogSimpleActionProps {
|
|
confirmButtonText?: string;
|
|
loading?: boolean;
|
|
|
|
onClose(): void;
|
|
|
|
onConfirmButtonClick(): void;
|
|
}
|
|
|
|
export function DialogActionBar(props: DialogSimpleActionProps) {
|
|
return (
|
|
<DialogActions>
|
|
<Button onClick={props.onClose} color="primary">
|
|
Abbrechen
|
|
</Button>
|
|
<ButtonWithSpinner
|
|
onClick={props.onConfirmButtonClick}
|
|
autoFocus
|
|
loading={props.loading}
|
|
>
|
|
{props.confirmButtonText || "Ok"}
|
|
</ButtonWithSpinner>
|
|
</DialogActions>
|
|
);
|
|
}
|