forked from thoughtworks/HeartBeat
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e4010f4
commit 2cb6a12
Showing
10 changed files
with
89 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 9 additions & 2 deletions
11
frontend/src/containers/ConfigStep/ResetConfirmDialog/style.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,21 @@ | ||
import { styled } from '@mui/material/styles'; | ||
import { DialogContent } from '@mui/material'; | ||
|
||
export const ResetConfirmDialogButtonGroup = styled('div')({ | ||
display: 'flex', | ||
justifyContent: 'center', | ||
margin: '1rem auto', | ||
width: '100%', | ||
justifyContent: 'end', | ||
margin: '3rem 0 0', | ||
}); | ||
|
||
export const ResetConfirmDialogContent = styled(DialogContent)({ | ||
fontSize: '1.2rem', | ||
}); | ||
|
||
export const ResetConfirmDialogTitle = styled('div')({ | ||
width: '100%', | ||
position: 'relative', | ||
fontSize: '1.125rem', | ||
textAlign: 'center', | ||
marginBottom: '3rem', | ||
}); |
52 changes: 39 additions & 13 deletions
52
frontend/src/containers/MetricsStepper/ConfirmDialog/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,49 @@ | ||
import { | ||
CancelButton, | ||
ConformationDialog, | ||
DialogButtonGroup, | ||
YesButton, | ||
} from '@src/containers/MetricsStepper/ConfirmDialog/style'; | ||
ResetConfirmDialogButtonGroup, | ||
ResetConfirmDialogContent, | ||
ResetConfirmDialogTitle, | ||
} from '@src/containers/ConfigStep/ResetConfirmDialog/style'; | ||
import { StyledDialogContainer } from '@src/containers/MetricsStep/ReworkSettings/ReworkDialog/style'; | ||
import { CancelButton, YesButton } from '@src/containers/MetricsStepper/ConfirmDialog/style'; | ||
import CloseIcon from '@mui/icons-material/Close'; | ||
import { Dialog } from '@mui/material'; | ||
import React from 'react'; | ||
|
||
export const ConfirmDialog = (props: { onConfirm: () => void; onClose: () => void; isDialogShowing: boolean }) => { | ||
const { onConfirm, onClose, isDialogShowing } = props; | ||
return ( | ||
<Dialog open={isDialogShowing}> | ||
<ConformationDialog>All the filled data will be cleared. Continue to Home page?</ConformationDialog> | ||
<DialogButtonGroup> | ||
<YesButton onClick={onConfirm}>Yes</YesButton> | ||
<CancelButton variant='outlined' onClick={onClose}> | ||
Cancel | ||
</CancelButton> | ||
</DialogButtonGroup> | ||
<Dialog open={isDialogShowing} maxWidth={'md'} onClose={onClose} aria-label={'return to home page confirm dialog'}> | ||
<StyledDialogContainer> | ||
<ResetConfirmDialogTitle aria-label={'return to home page confirm dialog title'}> | ||
<CloseIcon | ||
onClick={onClose} | ||
aria-label='return to home page close' | ||
sx={{ | ||
position: 'absolute', | ||
right: 0, | ||
top: 0, | ||
'&:hover': { | ||
cursor: 'pointer', | ||
}, | ||
}} | ||
/> | ||
</ResetConfirmDialogTitle> | ||
<ResetConfirmDialogContent aria-label={'return to home page confirm dialog content'}> | ||
All the filled data will be cleared. Continue to Home page? | ||
</ResetConfirmDialogContent> | ||
<ResetConfirmDialogButtonGroup> | ||
<YesButton onClick={onConfirm} aria-label={'return to home page confirm dialog confirm button'}> | ||
Yes | ||
</YesButton> | ||
<CancelButton | ||
variant='outlined' | ||
onClick={onClose} | ||
aria-label={'return to home page confirm dialog cancel button'} | ||
> | ||
Cancel | ||
</CancelButton> | ||
</ResetConfirmDialogButtonGroup> | ||
</StyledDialogContainer> | ||
</Dialog> | ||
); | ||
}; |
11 changes: 0 additions & 11 deletions
11
frontend/src/containers/MetricsStepper/ConfirmDialog/style.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters