Skip to content

Commit

Permalink
feat: improved position of modal (#19)
Browse files Browse the repository at this point in the history
* feat: improved position of modal

- Overrode modal CSS to be towards top of page
- Changed page limit to 10 so you don't have to scroll after the modal

* chore: nit
  • Loading branch information
ilee2u authored Dec 5, 2023
1 parent 466c54a commit 9500a81
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/pages/ExamsPage/components/AttemptList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ const AttemptList = ({ attempts }) => {
isLoading={attempts == null}
isPaginated
initialState={{
pageSize: 20,
pageSize: 10,
}}
isFilterable
defaultColumnValues={{ Filter: TextFilter }}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/ExamsPage/components/ResetExamAttemptButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const ResetExamAttemptButton = ({ username, examName, attemptId }) => {
title="my dialog"
isOpen={isOpen}
onClose={close}
size="md"
size="lg"
variant="default"
hasCloseButton
isFullscreenOnMobile
Expand Down
2 changes: 1 addition & 1 deletion src/pages/ExamsPage/components/ReviewExamAttemptButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const ReviewExamAttemptButton = ({
title="my dialog"
isOpen={isOpen}
onClose={close}
size="md"
size="lg"
variant="default"
hasCloseButton
isFullscreenOnMobile
Expand Down
6 changes: 6 additions & 0 deletions src/pages/ExamsPage/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,9 @@
border: none;
width: 0px;
}

// Align modals towards the top of the iframe, as it aligns center (which is awkward to have to scroll to) by default
div.pgn__modal-content-container {
align-items: start;
padding-top: 6.5%;
}

0 comments on commit 9500a81

Please sign in to comment.