Skip to content

Commit

Permalink
added close button
Browse files Browse the repository at this point in the history
  • Loading branch information
qiandrewj committed May 5, 2024
1 parent 84a6ed8 commit 59949ca
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
13 changes: 7 additions & 6 deletions client/src/modules/Admin/Components/ManageAdminModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import styles from '../Styles/ManageAdminModal.module.css'

import { Student } from 'common'
import AdminUser from './AdminUser'
import closeIcon from '../../../assets/icons/X.svg'

type Props = {
open: boolean
Expand Down Expand Up @@ -55,7 +56,12 @@ const ManageAdminModal = ({token, open, setOpen}: Props) => {
<div className={styles.modalbg}>
<div className={styles.modal}>
<h2>Administrators</h2>

<img
className={styles.closeButton}
onClick={closeModal}
src={closeIcon}
alt="close-modal"
/>
{admins.map((admin) => {
return (
<AdminUser
Expand All @@ -65,11 +71,6 @@ const ManageAdminModal = ({token, open, setOpen}: Props) => {
/>
)
})}
<button
onClick={closeModal}
>
Close
</button>
</div>
</div>
)
Expand Down
2 changes: 1 addition & 1 deletion client/src/modules/Admin/Styles/AdminUser.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
font-size: var(--font-small-size);
border-radius: 5px;
margin-left: auto;
padding: 1px 3px;
padding: 5px 3px;
cursor: pointer;
}
8 changes: 8 additions & 0 deletions client/src/modules/Admin/Styles/ManageAdminModal.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,12 @@

position: relative;
top: 0;
overflow-y: auto;
}

.closeButton {
cursor: pointer;
position: absolute;
top: 32px;
right: 32px;
}

0 comments on commit 59949ca

Please sign in to comment.