File size: 883 Bytes
9398f44
 
 
 
 
 
 
 
 
 
 
 
9e2df12
 
 
9398f44
9e2df12
9398f44
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import MathText from '../shared/MathText'

const TYPE_LABELS = {
  mcq: 'MCQ Single',
  msq: 'MSQ Multiple',
  nat: 'NAT Numerical',
}

export default function QuestionMetaBar({ question }) {
  const typeLabel = TYPE_LABELS[question.question_type] ?? question.question_type

  return (
    <div className="px-3 sm:px-4 py-1.5 text-xs border-b border-border flex items-center flex-wrap gap-2 sm:gap-4 flex-shrink-0 bg-card text-card-foreground">
      <span className="text-muted-foreground">
        Question Type: <strong className="text-foreground">{typeLabel}</strong>
      </span>
      <span className="text-muted-foreground">
        Marks: <strong className="text-success-text">+{question.marks}</strong>
        {question.negative_marks > 0 && (
          <span className="text-destructive ml-1">/ -{question.negative_marks}</span>
        )}
      </span>
    </div>
  )
}