-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
naheyansheikh
committed
Dec 4, 2024
1 parent
5135c7e
commit f0e82f0
Showing
11 changed files
with
605 additions
and
417 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
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,81 @@ | ||
.modal-content { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
padding: 2rem; | ||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
transform: translate(-50%, -50%); | ||
height: 380px; | ||
width: 640px; | ||
background-color: #FBFCFE; | ||
border-radius: 20px; | ||
box-shadow: 24; | ||
} | ||
|
||
.close-modal-button { | ||
position: absolute; | ||
top: 40px; | ||
left: 40px; | ||
height: 40px; | ||
width: 40px; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
background-color: transparent; | ||
color: #244B94; | ||
border-radius: 40px; | ||
} | ||
|
||
.close-modal-button:hover { | ||
background-color: rgb(219, 219, 219); | ||
} | ||
|
||
.modal-description { | ||
font-size: 24px; | ||
font-weight: bold; | ||
margin: 1rem; | ||
} | ||
|
||
.new-log-modal-divider { | ||
width: 60%; | ||
} | ||
|
||
.new-log-modal-buttons-container { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
margin-top: 2rem; | ||
gap: 20px; | ||
} | ||
|
||
.upload-photo-button { | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: center; | ||
align-items: center; | ||
color: #F7FAFF; | ||
gap: 12px; | ||
} | ||
|
||
.create-manually-button { | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: center; | ||
align-items: center; | ||
color: #4f607e; | ||
gap: 12px; | ||
} | ||
|
||
.close-x-icon { | ||
height: 34px; | ||
width: 34px; | ||
color: inherit; | ||
} | ||
|
||
.modal-icon { | ||
height: 40px; | ||
width: 40px; | ||
} |
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,65 @@ | ||
import { useState } from "react"; | ||
import { useNavigate } from "react-router-dom"; | ||
import { CLButtonPrimary, CLButtonSecondary } from "../Buttons/CLButtons"; | ||
import { | ||
PhotoIcon, | ||
PencilSquareIcon, | ||
XMarkIcon, | ||
} from "@heroicons/react/24/outline"; | ||
import Box from "@mui/material/Box"; | ||
import Modal from "@mui/material/Modal"; | ||
import Divider from "@mui/material/Divider"; | ||
import "./NewLogModal.css"; | ||
|
||
export const NewLogModal = () => { | ||
const [open, setOpen] = useState(false); | ||
const handleOpen = () => setOpen(true); | ||
const handleClose = () => setOpen(false); | ||
|
||
const navigate = useNavigate(); | ||
|
||
const handleUploadPhoto = () => { | ||
navigate("/upload-photo"); | ||
}; | ||
|
||
const handleCreateManually = () => { | ||
navigate("/manualEntry"); | ||
}; | ||
|
||
return ( | ||
<div> | ||
<CLButtonPrimary onClick={handleOpen} width={"230px"} height={"46px"}> | ||
Create New Log | ||
</CLButtonPrimary> | ||
<Modal open={open} onClose={handleClose}> | ||
<Box className="modal-content"> | ||
<button className="close-modal-button" onClick={handleClose}> | ||
<XMarkIcon className="close-x-icon" /> | ||
</button> | ||
<p className="modal-description"> | ||
How would you like to create a new log? | ||
</p> | ||
<Divider className="new-log-modal-divider" /> | ||
<div className="new-log-modal-buttons-container"> | ||
<CLButtonPrimary | ||
className="upload-photo-button" | ||
onClick={handleUploadPhoto} | ||
width={"330px"} | ||
> | ||
<PhotoIcon className="modal-icon" /> | ||
<p>Upload Photo</p> | ||
</CLButtonPrimary> | ||
<CLButtonSecondary | ||
className="create-manually-button" | ||
onClick={handleCreateManually} | ||
width={"330px"} | ||
> | ||
<PencilSquareIcon className="modal-icon" /> | ||
<p>Create Manually</p> | ||
</CLButtonSecondary> | ||
</div> | ||
</Box> | ||
</Modal> | ||
</div> | ||
); | ||
}; |
Oops, something went wrong.