-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
782 give every modal a header with title and close button (#829)
- Loading branch information
1 parent
8f84648
commit 9ad9a5e
Showing
35 changed files
with
370 additions
and
316 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 |
---|---|---|
|
@@ -46,6 +46,7 @@ | |
position: fixed; | ||
top: 50%; | ||
left: 50%; | ||
overflow: hidden; | ||
margin: 0; | ||
padding: 0; | ||
border: none; | ||
|
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
48 changes: 31 additions & 17 deletions
48
frontend/src/components/DocumentViewer/DocumentViewBox.css
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
44 changes: 0 additions & 44 deletions
44
frontend/src/components/DocumentViewer/DocumentViewBoxHeader.css
This file was deleted.
Oops, something went wrong.
45 changes: 0 additions & 45 deletions
45
frontend/src/components/DocumentViewer/DocumentViewBoxHeader.tsx
This file was deleted.
Oops, something went wrong.
38 changes: 38 additions & 0 deletions
38
frontend/src/components/DocumentViewer/DocumentViewBoxNav.css
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,38 @@ | ||
.view-documents-nav { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 1.25rem; | ||
align-items: stretch; | ||
padding-bottom: 0.25rem; | ||
color: var(--main-text-colour); | ||
} | ||
|
||
.view-documents-nav .info { | ||
margin: 0; | ||
padding: 0; | ||
font-size: 1.25rem; | ||
} | ||
|
||
.view-documents-nav .button-container { | ||
display: flex; | ||
gap: 1rem; | ||
justify-content: space-between; | ||
align-items: center; | ||
align-self: stretch; | ||
} | ||
|
||
.view-documents-nav .button-container button { | ||
flex: 0 0 30%; | ||
white-space: nowrap; | ||
} | ||
|
||
.view-documents-nav .button-container button:focus-visible { | ||
background-color: var(--action-button-background-colour-hover); | ||
outline-color: var(--main-text-colour); | ||
} | ||
|
||
.view-documents-nav | ||
.button-container | ||
button[aria-disabled='true']:focus-visible { | ||
background-color: var(--action-button-disabled-background-colour); | ||
} |
42 changes: 42 additions & 0 deletions
42
frontend/src/components/DocumentViewer/DocumentViewBoxNav.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,42 @@ | ||
import ThemedButton from '@src/components/ThemedButtons/ThemedButton'; | ||
|
||
import './DocumentViewBoxNav.css'; | ||
|
||
interface DocumentViewBoxNavProps { | ||
documentIndex: number; | ||
documentName: string; | ||
numberOfDocuments: number; | ||
onPrevious: () => void; | ||
onNext: () => void; | ||
} | ||
|
||
function DocumentViewBoxNav({ | ||
documentIndex, | ||
documentName, | ||
numberOfDocuments, | ||
onPrevious, | ||
onNext, | ||
}: DocumentViewBoxNavProps) { | ||
const documentNumber = `${documentIndex + 1} out of ${numberOfDocuments}`; | ||
|
||
return ( | ||
<div className="view-documents-nav"> | ||
<nav className="button-container"> | ||
<ThemedButton onClick={onPrevious} ariaDisabled={documentIndex <= 0}> | ||
<i aria-hidden>◄</i> previous document | ||
</ThemedButton> | ||
<div className="info">{documentNumber}</div> | ||
<ThemedButton | ||
onClick={onNext} | ||
ariaDisabled={documentIndex >= numberOfDocuments - 1} | ||
> | ||
next document <i aria-hidden>►</i> | ||
</ThemedButton> | ||
</nav> | ||
<p className="info">{documentName}</p> | ||
</div> | ||
); | ||
} | ||
|
||
export default DocumentViewBoxNav; | ||
export type { DocumentViewBoxNavProps }; |
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
26 changes: 0 additions & 26 deletions
26
frontend/src/components/HandbookOverlay/HandbookCloseIcon.tsx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.