fix close button
This commit is contained in:
parent
8b9d27e34b
commit
fc0d7bb5d9
|
@ -9,6 +9,9 @@ export function UploadProgressFooter() {
|
||||||
UploadProgressContext
|
UploadProgressContext
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const handleClose = () => {
|
||||||
|
onClose(null, null);
|
||||||
|
};
|
||||||
return (
|
return (
|
||||||
<DialogActions>
|
<DialogActions>
|
||||||
{uploadStage === UPLOAD_STAGES.FINISH &&
|
{uploadStage === UPLOAD_STAGES.FINISH &&
|
||||||
|
@ -18,10 +21,7 @@ export function UploadProgressFooter() {
|
||||||
{constants.RETRY_FAILED}
|
{constants.RETRY_FAILED}
|
||||||
</Button>
|
</Button>
|
||||||
) : (
|
) : (
|
||||||
<Button
|
<Button variant="contained" fullWidth onClick={handleClose}>
|
||||||
variant="contained"
|
|
||||||
fullWidth
|
|
||||||
onClick={() => onClose.bind(null)}>
|
|
||||||
{constants.CLOSE}
|
{constants.CLOSE}
|
||||||
</Button>
|
</Button>
|
||||||
))}
|
))}
|
||||||
|
|
|
@ -51,6 +51,9 @@ export function UploadProgressTitle() {
|
||||||
UploadProgressContext
|
UploadProgressContext
|
||||||
);
|
);
|
||||||
const toggleExpanded = () => setExpanded((expanded) => !expanded);
|
const toggleExpanded = () => setExpanded((expanded) => !expanded);
|
||||||
|
const handleClose = () => {
|
||||||
|
onClose(null, null);
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DialogTitle>
|
<DialogTitle>
|
||||||
|
@ -64,7 +67,7 @@ export function UploadProgressTitle() {
|
||||||
<IconButtonWithBG onClick={toggleExpanded}>
|
<IconButtonWithBG onClick={toggleExpanded}>
|
||||||
{expanded ? <MinimizeIcon /> : <MaximizeIcon />}
|
{expanded ? <MinimizeIcon /> : <MaximizeIcon />}
|
||||||
</IconButtonWithBG>
|
</IconButtonWithBG>
|
||||||
<IconButtonWithBG onClick={onClose.bind(null)}>
|
<IconButtonWithBG onClick={handleClose}>
|
||||||
<Close />
|
<Close />
|
||||||
</IconButtonWithBG>
|
</IconButtonWithBG>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|
Loading…
Reference in a new issue