-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix styling * Add DeleteConfirmation to deleting dataset fields and collections * Update changelog * Fix EditDatasetDrawer to take new props * Address PR feedback
- Loading branch information
1 parent
8775c86
commit 3b2c1fd
Showing
9 changed files
with
151 additions
and
56 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
Binary file not shown.
46 changes: 46 additions & 0 deletions
46
clients/admin-ui/src/features/common/ConfirmationModal.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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import { | ||
Button, | ||
Modal, | ||
ModalBody, | ||
ModalContent, | ||
ModalFooter, | ||
ModalHeader, | ||
ModalOverlay, | ||
SimpleGrid, | ||
} from "@fidesui/react"; | ||
import { ReactNode } from "react"; | ||
|
||
interface Props { | ||
isOpen: boolean; | ||
onClose: () => void; | ||
onDelete: () => void; | ||
title: string; | ||
message: ReactNode; | ||
} | ||
const ConfirmationModal = ({ | ||
isOpen, | ||
onClose, | ||
onDelete, | ||
title, | ||
message, | ||
}: Props) => ( | ||
<Modal isOpen={isOpen} onClose={onClose} size="lg"> | ||
<ModalOverlay /> | ||
<ModalContent textAlign="center" p={2}> | ||
<ModalHeader fontWeight="medium">{title}</ModalHeader> | ||
<ModalBody>{message}</ModalBody> | ||
<ModalFooter> | ||
<SimpleGrid columns={2} width="100%"> | ||
<Button variant="outline" mr={3} onClick={onClose}> | ||
Cancel | ||
</Button> | ||
<Button colorScheme="primary" onClick={onDelete}> | ||
Continue | ||
</Button> | ||
</SimpleGrid> | ||
</ModalFooter> | ||
</ModalContent> | ||
</Modal> | ||
); | ||
|
||
export default ConfirmationModal; |
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
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