Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Finish base of infraction modal
  • Loading branch information
regalijan committed Oct 19, 2023
1 parent 5a5d398 commit 7d8f9ac
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions components/NewInfractionModal.tsx
Expand Up @@ -5,13 +5,25 @@ import {
ModalBody,
ModalCloseButton,
ModalContent,
ModalFooter,
ModalHeader,
ModalOverlay,
Select,
Text,
} from "@chakra-ui/react";

export default function (props: { isOpen: boolean; onClose: () => void }) {
function reset() {
(
document.getElementById("punishment") as unknown as HTMLSelectElement
).selectedIndex = -1;
(document.getElementById("user") as HTMLInputElement).value = "";
(document.getElementById("evidence") as HTMLInputElement).value = "";

props.onClose();
}
async function submit() {}

return (
<Modal isCentered isOpen={props.isOpen} onClose={props.onClose}>
<ModalOverlay />
Expand All @@ -38,6 +50,18 @@ export default function (props: { isOpen: boolean; onClose: () => void }) {
<Button>Select Files</Button>
<input id="evidence" multiple type="file" />
</ModalBody>
<ModalFooter>
<Button colorScheme="ghost" onClick={reset}>
Cancel
</Button>
<Button
colorScheme="blue"
ml="8px"
onClick={async () => await submit()}
>
Submit
</Button>
</ModalFooter>
</ModalContent>
</Modal>
);
Expand Down

0 comments on commit 7d8f9ac

Please sign in to comment.