generated from HackYourFuture-CPH/boilerplate-for-fp
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from HackYourFuture-CPH/report-questions-page/…
…rumana Implementing report page
- Loading branch information
Showing
8 changed files
with
165 additions
and
25 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
23 changes: 23 additions & 0 deletions
23
packages/client/src/components/ReportPage/ReportTextField.jsx
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,23 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; // Import PropTypes | ||
import './Textfield.css'; | ||
|
||
const ReportTextField = ({ value, onChange }) => { | ||
return ( | ||
<textarea | ||
className="text-field" | ||
placeholder="Your response" | ||
value={value} | ||
onChange={(e) => onChange(e.target.value)} | ||
rows="2" | ||
/> | ||
); | ||
}; | ||
|
||
// Add prop type validation | ||
ReportTextField.propTypes = { | ||
value: PropTypes.string.isRequired, // Validate value prop as string and required | ||
onChange: PropTypes.func.isRequired, // Validate onChange prop as function and required | ||
}; | ||
|
||
export default ReportTextField; |
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,11 @@ | ||
.text-field { | ||
width: 100%; | ||
margin-bottom: 10px; | ||
display: flex; | ||
padding: 12px 24px; | ||
align-items: center; | ||
gap: 32px; | ||
border-radius: 4px; | ||
border-bottom: 0.2px solid var(--Neutral-500, #64748b); | ||
background: var(--Shades-White, #fff); | ||
} |
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,41 @@ | ||
import React from 'react'; | ||
import { Typography } from '@mui/material'; | ||
import NavigationBar from '../../components/Dashboard/NavigationBar'; | ||
import placeholder from '../Dashboard/placeholder.png'; | ||
import '../Dashboard/Dashboard.css'; | ||
import { ReportPageQuestions } from './ReportPageQuestions'; | ||
|
||
const ReportPage = () => { | ||
return ( | ||
<div className="dashboard-container"> | ||
<NavigationBar /> | ||
<div className="content-container"> | ||
<div className="top-nav-bar"> | ||
<div className="heading-text"> | ||
<Typography variant="h4">Dashboard</Typography> | ||
<Typography className="sub-heading" variant="body1"> | ||
Welcome back, Meraj | ||
</Typography> | ||
</div> | ||
|
||
<div className="image-container"> | ||
<img | ||
className="placeholder-image" | ||
src={placeholder} | ||
alt="Placeholder" | ||
/> | ||
<div className="name-mail-container"> | ||
<Typography variant="h6">Meraj</Typography> | ||
<Typography className="subtext" variant="body2"> | ||
meraj@gmail.com | ||
</Typography> | ||
</div> | ||
</div> | ||
</div> | ||
<ReportPageQuestions /> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default ReportPage; |
43 changes: 43 additions & 0 deletions
43
packages/client/src/containers/ReportPage/ReportPageQuestions.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,43 @@ | ||
.report-container { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: flex-start; | ||
gap: 48px; | ||
align-self: stretch; | ||
padding: 0 48px; | ||
} | ||
.report-questions-container { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: flex-end; | ||
gap: 24px; | ||
align-self: stretch; | ||
} | ||
|
||
.questions-container { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: flex-start; | ||
gap: 16px; | ||
align-self: stretch; | ||
} | ||
|
||
.question-text { | ||
display: flex; | ||
align-items: center; | ||
gap: 32px; | ||
align-self: stretch; | ||
} | ||
|
||
.text-field { | ||
display: flex; | ||
padding: 24px 48px; | ||
align-items: center; | ||
gap: 32px; | ||
align-self: stretch; | ||
border-radius: 4px; | ||
border: 0.2px solid #1d4ed8; | ||
background: #fff; | ||
} |
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