Skip to content
Snippets Groups Projects
Commit 05e70e6e authored by Max Frederiksen's avatar Max Frederiksen
Browse files

Add loading indicator

parent 76510227
No related branches found
No related tags found
1 merge request!199CE-3150: Remove automatic onclose call
Pipeline #211072 failed
......@@ -11,7 +11,8 @@ import {
Stack,
Typography,
Grid,
TextField
TextField,
LinearProgress
} from "@mui/material";
import CloseIcon from "@mui/icons-material/Close";
......@@ -87,7 +88,8 @@ export const Dialog = ({
open,
onClose,
DialogProps = {},
className
className,
isLoading
}) => {
return (
<MuiDialog
......@@ -104,6 +106,7 @@ export const Dialog = ({
) : (
<Box>{content}</Box>
)}
{isLoading && <LinearProgress sx={{ marginTop: "16px" }} />}
</DialogContent>
{renderActions ? (
<DialogActions>{renderActions(onClose)}</DialogActions>
......@@ -207,8 +210,16 @@ export const ConfirmationDialog = styled(
)({});
export const ConfirmDangerActionDialog = ({ ...props }) => {
const { title, text, confirmText, valueToCheck, open, onClose, onConfirm } =
props;
const {
title,
text,
confirmText,
valueToCheck,
open,
onClose,
onConfirm,
isLoading
} = props;
const [isConfirmDisabled, setIsConfirmDisabled] = useState(true);
const handleInputChange = (event) => {
......@@ -257,7 +268,7 @@ export const ConfirmDangerActionDialog = ({ ...props }) => {
</Grid>
</Grid>
}
{...{ open, onConfirm, isConfirmDisabled }}
{...{ open, onConfirm, isConfirmDisabled, isLoading }}
/>
);
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment