-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
5 changed files
with
123 additions
and
1 deletion.
There are no files selected for viewing
73 changes: 73 additions & 0 deletions
73
...ject/src/components/Patinet Screens/QuestionDetails/QuestionComments/QuestionComments.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,73 @@ | ||
import { Typography, Box, Avatar, Stack } from "@mui/material"; | ||
import { useState } from "react"; | ||
|
||
export default function QuestionComments() { | ||
const [comments, setComments] = useState([ | ||
{ id: 1, comment: "hello", name: undefined, profile: "" }, | ||
{ id: 2, comment: "hi", name: "أحمد", profile: "" }, | ||
{ id: 3, comment: "yes iam here", name: "براء", profile: "" }, | ||
{ id: 4, comment: "no i am not here", name: "أحمد", profile: "" }, | ||
]); | ||
|
||
return ( | ||
<Box p={4}> | ||
{comments.map((element) => { | ||
return ( | ||
<Comment | ||
key={element.id} | ||
Comment={element.comment} | ||
CommenterName={element.name} | ||
profile={element.profile} | ||
/> | ||
); | ||
})} | ||
</Box> | ||
); | ||
} | ||
|
||
// eslint-disable-next-line react/prop-types | ||
function Comment({ Comment, CommenterName, profile }) { | ||
if (CommenterName == undefined) { | ||
return ( | ||
<Stack direction="row" gap={2} sx={{ direction: "ltr" }}> | ||
<Avatar src={profile} /> | ||
<Box sx={{ | ||
borderRadius: "5px", | ||
backgroundColor: "var(--primary)", | ||
color: "white", | ||
display:'inline', | ||
padding:'10px 15px' | ||
}}> | ||
<Typography | ||
variant="string" | ||
> | ||
{Comment} | ||
</Typography> | ||
|
||
</Box> | ||
</Stack> | ||
); | ||
} | ||
return ( | ||
<Box m={1} mb={3}> | ||
<Stack direction="row" gap={2}> | ||
<Avatar src={profile} /> | ||
<Typography variant="subtitle1"> {CommenterName}</Typography> | ||
</Stack> | ||
<Box m={1} mr={7} sx={{ | ||
borderRadius: "5px", | ||
backgroundColor: "var(--primary)", | ||
color: "white", | ||
display:'inline', | ||
padding:'5px 15px' | ||
}}> | ||
<Typography | ||
|
||
variant="string" | ||
> | ||
{Comment} | ||
</Typography> | ||
</Box> | ||
</Box> | ||
); | ||
} |
Empty file.
26 changes: 26 additions & 0 deletions
26
...f5thYearProject/src/components/Patinet Screens/QuestionDetails/QuestionDetails.module.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,26 @@ | ||
.container{ | ||
width: 60%; | ||
height: auto; | ||
border-radius: 20px; | ||
margin:5% auto; | ||
} | ||
.container > div:first-child{ | ||
background-image: linear-gradient(to left, #68C1C2, #F3F2F2 100%); | ||
border: 2px solid #000; | ||
border-radius: 20px; | ||
padding: 20px; | ||
text-align: center; | ||
color:#787878; | ||
} | ||
.container > div:nth-child(2){ | ||
margin-top:20px; | ||
margin-bottom:20px; | ||
width: 100%; | ||
} | ||
.container > div:nth-child(2) > img{ | ||
width: 100%; | ||
} | ||
.container >div:nth-child(3){ | ||
background-color: white; | ||
border-radius: 10px; | ||
} |
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
21 changes: 21 additions & 0 deletions
21
frontOf5thYearProject/src/pages/Patient Screens/QuestionDetails.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,21 @@ | ||
import {Box, Typography} from '@mui/material' | ||
import classes from '../../components/Patinet Screens/QuestionDetails/QuestionDetails.module.css' | ||
import QuestionComments from '../../components/Patinet Screens/QuestionDetails/QuestionComments/QuestionComments' | ||
import image from '../../assets/image/contact.png' | ||
export default function QuestionDetails() { | ||
return ( | ||
<Box className={classes.container}> | ||
<Box > | ||
<Typography > | ||
هنا السؤال | ||
</Typography> | ||
</Box> | ||
<Box> | ||
<img src={image} alt="" /> | ||
</Box> | ||
<Box> | ||
<QuestionComments /> | ||
</Box> | ||
</Box> | ||
) | ||
} |