mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
refactor(frontend): update inviteUser dialog
This commit is contained in:
@@ -17,16 +17,20 @@ export const FormDialog = ({
|
||||
title,
|
||||
children,
|
||||
onSubmit,
|
||||
cancelButtonProps,
|
||||
confirmButtonProps,
|
||||
...rest
|
||||
}: FormDialogProps) => {
|
||||
const handleClose = () => rest.onClose?.({}, "backdropClick");
|
||||
const onCancel = () => rest.onClose?.({}, "backdropClick");
|
||||
|
||||
return (
|
||||
<Dialog fullWidth {...rest}>
|
||||
<DialogTitle onClose={handleClose}>{title}</DialogTitle>
|
||||
<DialogTitle onClose={onCancel}>{title}</DialogTitle>
|
||||
<DialogContent>{children}</DialogContent>
|
||||
<DialogActions style={{ padding: "0.5rem" }}>
|
||||
<DialogFormButtons onCancel={handleClose} onSubmit={onSubmit} />
|
||||
<DialogFormButtons
|
||||
{...{ onSubmit, onCancel, confirmButtonProps, cancelButtonProps }}
|
||||
/>
|
||||
</DialogActions>
|
||||
</Dialog>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user