frontend/src/components/Transfer/index.tsx

46 lines
1.0 KiB
TypeScript
Raw Normal View History

2020-06-01 16:26:58 +02:00
import React from "react";
import Modal from "@material-ui/core/Modal";
import "./index.scss";
interface TransferProps {
2020-06-03 15:43:11 +02:00
handleClose: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
2020-06-01 16:26:58 +02:00
isOpen: boolean;
}
2020-06-03 15:43:11 +02:00
interface TransferState {}
2020-06-01 16:26:58 +02:00
export default class Transfer extends React.Component<
TransferProps,
TransferState
> {
constructor(props: TransferProps) {
super(props);
this.handleClose = this.handleClose.bind(this);
}
handleClose(e: React.MouseEvent<HTMLButtonElement, MouseEvent>) {
2020-06-03 15:43:11 +02:00
this.props.handleClose(e);
2020-06-01 16:26:58 +02:00
}
render() {
return (
<div>
<Modal
2020-06-03 15:43:11 +02:00
className="wrapper"
open={this.props.isOpen}
2020-06-01 16:26:58 +02:00
onClose={this.handleClose}
aria-labelledby="simple-modal-title"
aria-describedby="simple-modal-description"
>
2020-06-03 15:43:11 +02:00
<div className="transfer">
<button type="button" onClick={this.handleClose}>
Close Modal
</button>
</div>
2020-06-01 16:26:58 +02:00
</Modal>
</div>
);
}
}