added CancelSubmit common element
This commit is contained in:
parent
374ba20f0c
commit
c31712464b
5 changed files with 55 additions and 42 deletions
|
|
@ -1,7 +1,6 @@
|
|||
import {
|
||||
Avatar,
|
||||
Box,
|
||||
Button,
|
||||
Dialog,
|
||||
DialogActions,
|
||||
DialogContent,
|
||||
|
|
@ -22,6 +21,7 @@ import React, { useState } from "react";
|
|||
import { pond } from "protobuf-ts/pond";
|
||||
import { red } from "@mui/material/colors";
|
||||
import { makeStyles } from "@mui/styles";
|
||||
import CancelSubmit from "common/CancelSubmit";
|
||||
|
||||
interface Props {
|
||||
index: number;
|
||||
|
|
@ -134,12 +134,11 @@ export default function ChatMessage(props: Props) {
|
|||
<DialogContent>Are you sure you wish to delete this message</DialogContent>
|
||||
|
||||
<DialogActions>
|
||||
<Button onClick={closeDialog} color="primary">
|
||||
Cancel
|
||||
</Button>
|
||||
<Button onClick={deleteMessage} color="primary">
|
||||
Delete
|
||||
</Button>
|
||||
<CancelSubmit
|
||||
onCancel={closeDialog}
|
||||
onSubmit={deleteMessage}
|
||||
submitText="Delete"
|
||||
/>
|
||||
</DialogActions>
|
||||
</Dialog>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue