From 3e019b0ced31aafea85e1e0fc86dc56a5b5beb9a Mon Sep 17 00:00:00 2001 From: Sergio Betanzos Date: Fri, 12 Mar 2021 14:38:59 +0100 Subject: [PATCH] F #3951: Fix close button dialog as x (#965) --- .../components/Dialogs/DialogConfirmation.js | 46 +++++++++++-------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/src/fireedge/src/client/components/Dialogs/DialogConfirmation.js b/src/fireedge/src/client/components/Dialogs/DialogConfirmation.js index 22a9a20286..6cde02b903 100644 --- a/src/fireedge/src/client/components/Dialogs/DialogConfirmation.js +++ b/src/fireedge/src/client/components/Dialogs/DialogConfirmation.js @@ -3,14 +3,15 @@ import PropTypes from 'prop-types' import { useMediaQuery, - Button, Dialog, DialogTitle, DialogContent, DialogActions, Typography, + IconButton, makeStyles } from '@material-ui/core' +import { Close as CloseIcon } from '@material-ui/icons' import { SubmitButton } from 'client/components/FormControl' import { Tr } from 'client/components/HOC' @@ -25,6 +26,11 @@ const useStyles = makeStyles(theme => ({ width: '100%', height: '100%' } + }, + closeButton: { + position: 'absolute', + right: '0.5em', + top: '0.5em' } })) @@ -59,30 +65,30 @@ const DialogConfirmation = memo( {title} {subheader && {subheader}} + {handleCancel && ( + + + + )} {children} - {(handleCancel || handleAccept) && ( + {handleAccept && ( - {handleCancel && ( - - )} - {handleAccept && ( - - )} + )}