generated from Real-Dev-Squad/website-template
-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add modal to acknowledge user about status change on marking progress…
… to 100% (#1322) * initial commit * refactor code * added feature flag * refactored some code * changed casing and removed comments * changed to predefined colouring * removed unnecessary useCallbacks * removed onstatus function * resolved commented changes * decereased the mismatch between the modal and design doc modal * changed button color * font change * used the already created modal component * dimensional changes * refactored function * small refactoring * async await updated * applied callback on close icon * refactored to named exports * removed a div element * rounded off the rem values * put the close icon inside button wrapper * rounded off rems * rounded off rem values
- Loading branch information
1 parent
f7717f7
commit 115bbfa
Showing
5 changed files
with
184 additions
and
17 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,57 @@ | ||
import React from 'react'; | ||
import Modal from '@/components/Modal/index'; | ||
import { IoMdClose } from 'react-icons/io'; | ||
import { FaCircleCheck } from 'react-icons/fa6'; | ||
import styles from '@/components/Modal/modal.module.scss'; | ||
|
||
interface CompletionModalProps { | ||
isOpen: boolean; | ||
onClose: () => void; | ||
} | ||
|
||
export const CompletionModal: React.FC<CompletionModalProps> = ({ | ||
isOpen, | ||
onClose, | ||
}) => { | ||
return ( | ||
<Modal isOpen={isOpen} toggle={onClose}> | ||
<div className={styles.modalContent}> | ||
<button | ||
className={styles.closeIcon} | ||
onClick={() => { | ||
onClose(); | ||
}} | ||
aria-label="Close" | ||
> | ||
<IoMdClose size={25} /> | ||
</button> | ||
|
||
<FaCircleCheck className={styles.checkIcon} /> | ||
<h3 className={styles.title}>Congratulations !</h3> | ||
<div className={styles.text}> | ||
<div>You have achieved 100% completion!</div> | ||
<div>Would you like to update your status?</div> | ||
</div> | ||
|
||
<div className={styles.buttonContainer}> | ||
<button | ||
className={styles.changeStatusButton} | ||
onClick={() => { | ||
onClose(); | ||
}} | ||
> | ||
Change status | ||
</button> | ||
<button | ||
className={styles.closeButton} | ||
onClick={() => { | ||
onClose(); | ||
}} | ||
> | ||
Close | ||
</button> | ||
</div> | ||
</div> | ||
</Modal> | ||
); | ||
}; |
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