Skip to content

Commit

Permalink
Question Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ravielze committed Aug 17, 2022
1 parent c3658df commit 3929577
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/Assignments/Essay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const Essay = (item: AssignmentComponentProps) => {
}, [scoreData, data]);

return (
<Form.Item label={<ReactMarkdown>{`[${item.question_no}] ${item.question}`}</ReactMarkdown>} key={item.id}>
<Form.Item label={<ReactMarkdown className="whitespace-pre-line">{`[${item.question_no}] ${item.question}`}</ReactMarkdown>} key={item.id}>
<Input.Group>
<Row gutter={[16, 16]} align="middle">
<Col xs={24} xl={20}>
Expand Down
5 changes: 4 additions & 1 deletion src/components/Assignments/Isian.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,11 @@ export const Isian = (item: AssignmentComponentProps) => {
}, [scoreData, data]);

return (
<Form.Item label={<ReactMarkdown>{`[${item.question_no}] ${item.question}`}</ReactMarkdown>} key={item.id}>
<Form.Item key={item.id}>
<Input.Group>
<Row>
<ReactMarkdown className="whitespace-pre-line">{`[${item.question_no}] ${item.question}`}</ReactMarkdown>
</Row>
<Row gutter={[16, 16]} align="middle">
<Col xs={24} xl={20}>
<Input onBlur={handleChange} onChange={handleChange} disabled={!item.editAnswer} maxLength={150}
Expand Down
5 changes: 4 additions & 1 deletion src/components/Assignments/PilihanGanda.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,11 @@ export const PilihanGanda = (item: AssignmentComponentProps) => {

const options = ['A', 'B', 'C', 'D', 'E'];
return (
<Form.Item label={<ReactMarkdown>{`[${item.question_no}] ${item.question}`}</ReactMarkdown>} key={item.id}>
<Form.Item key={item.id}>
<Input.Group>
<Row>
<ReactMarkdown className="whitespace-pre-line">{`[${item.question_no}] ${item.question}`}</ReactMarkdown>
</Row>
<Row gutter={[16, 16]} align="middle">
<Col
xs={24} xl={20}>
Expand Down

0 comments on commit 3929577

Please sign in to comment.