-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #84 from jembi/77-deactivate-link
Disable links
- Loading branch information
Showing
4 changed files
with
134 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { | ||
Button, | ||
Dialog, | ||
DialogActions, | ||
DialogContent, | ||
DialogContentText, | ||
DialogTitle, | ||
} from '@mui/material'; | ||
|
||
export const ConfirmationDialog = ({ | ||
confirmDeactivate, | ||
confirmDialogOpen, | ||
setConfirmDialogOpen, | ||
}: { | ||
confirmDeactivate: () => void; | ||
confirmDialogOpen: boolean; | ||
setConfirmDialogOpen: (arg: boolean) => void; | ||
}) => { | ||
return ( | ||
<Dialog | ||
open={confirmDialogOpen} | ||
onClose={() => setConfirmDialogOpen(false)} | ||
> | ||
<DialogTitle>Confirm Deactivation</DialogTitle> | ||
<DialogContent> | ||
<DialogContentText> | ||
Are you sure you want to deactivate this link? Deactivating will | ||
permanently disable the link, and you will need to create a new one. | ||
</DialogContentText> | ||
</DialogContent> | ||
<DialogActions> | ||
<Button onClick={() => setConfirmDialogOpen(false)}>Cancel</Button> | ||
<Button onClick={confirmDeactivate} color="error" variant="contained"> | ||
Deactivate | ||
</Button> | ||
</DialogActions> | ||
</Dialog> | ||
); | ||
}; | ||
|
||
export default ConfirmationDialog; |
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