-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implementation of finish question as non-answerer
- Loading branch information
Showing
3 changed files
with
63 additions
and
17 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
frontend/components/Course/InstructorQueuePage/FinishConfirmModal.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,34 @@ | ||
import { Button, Modal } from "semantic-ui-react"; | ||
|
||
interface FinishConfirmModalProps { | ||
onFinish: (forced?: boolean) => void; | ||
onClose: () => void; | ||
open: boolean; | ||
} | ||
|
||
const FinishConfirmModal = (props: FinishConfirmModalProps) => { | ||
const { onFinish, onClose, open } = props; | ||
|
||
return ( | ||
<Modal open={open}> | ||
<Modal.Header>Finish Confirmation</Modal.Header> | ||
<Modal.Content> | ||
<Modal.Description> | ||
You are about to finish a question that you did not start. | ||
Is this intended? | ||
</Modal.Description> | ||
</Modal.Content> | ||
<Modal.Actions> | ||
<Button content="Cancel" onClick={onClose} /> | ||
<Button | ||
content="Finish" | ||
loading={false} | ||
color="green" | ||
onClick={() => onFinish(true)} | ||
/> | ||
</Modal.Actions> | ||
</Modal> | ||
); | ||
}; | ||
|
||
export default FinishConfirmModal; |
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