Skip to content

Commit 1cf696d

Browse files
committed
Merge branch 'assignment1' of https://github.com/CS3219-AY2324S1/ay2324s1-course-assessment-g16 into assignment1
2 parents aa59e7a + f991c73 commit 1cf696d

File tree

3 files changed

+18
-8
lines changed

3 files changed

+18
-8
lines changed

peer-prep/src/Components/QuestionList/Question.css

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
background: #e9e9e9;
1414
padding: 0.5rem 1rem;
1515
border-radius: 5px;
16+
align-items: center;
1617
}
1718

1819
.q-header {
@@ -29,13 +30,23 @@
2930
.q-name {
3031
display: flex;
3132
align-items: center;
32-
height: 60px;
33+
min-height: 60px;
3334
font-size: 25px;
35+
overflow: hidden;
3436
}
3537

3638
.q-title {
37-
height: 30px;
39+
min-height: 30px;
40+
padding: 0.5rem 0.5rem;
41+
overflow: hidden;
42+
text-overflow: ellipsis;
43+
white-space: nowrap;
44+
}
45+
46+
.q-title-show {
47+
min-height: 30px;
3848
padding: 0.5rem 0.5rem;
49+
overflow: hidden;
3950
}
4051

4152
.q-tag-container {
@@ -76,23 +87,21 @@
7687
}
7788

7889
.q-description {
79-
width: 400px;
80-
height: 250px;
90+
width: 85%;
8191
margin-left: 20px;
8292
border: none;
93+
white-space: pre-line;
8394
}
8495

8596
.q-content {
8697
max-height: 0;
87-
overflow:hidden;
98+
overflow: hidden;
8899
}
89100

90101
.q-content-show {
91102
display: flex;
92103
flex-direction: column;
93104
gap: 20px;
94-
height:150px;
95-
96105
}
97106

98107
.delete-btn img {

peer-prep/src/Components/QuestionList/Question.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const Question = ({question, i, deleteQuestion, updateQuestion}) => {
3838
<div className={isEdit ? "q-form-id": "q-id"}>#{i + 1}</div>
3939
{isEdit === true? <input type="text" className="q-form-title q-form-input" defaultValue = {question.title}
4040
onChange = {(e) => {setTitle(e.target.value)}}/> :
41-
<div className="q-title">{question.title}</div>}
41+
<div className={selected === i ? "q-title-show": "q-title"}>{question.title}</div>}
4242
</div>
4343
<span> {selected === i ? "-" : "+"}</span>
4444
</div>

peer-prep/src/Components/QuestionList/QuestionForm.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
.q-form-title {
3131
height: 30px;
32+
width: 70%;
3233
padding: 0.5rem 0.5rem;
3334
}
3435

0 commit comments

Comments
 (0)