Changed from True/False to Yes/No
parent
ca81ec7524
commit
8e69567e6b
|
|
@ -35,15 +35,15 @@ export function QuestionField({ question, value, onChange }: QuestionFieldProps)
|
|||
control = (
|
||||
<div id={id} className="flex gap-6 pt-1" role="checkboxgroup" aria-label={question.label}>
|
||||
{[
|
||||
{ label: 'True', checked: value === true },
|
||||
{ label: 'False', checked: value === false },
|
||||
{ label: 'Yes', checked: value === true },
|
||||
{ label: 'No', checked: value === false },
|
||||
].map((option) => (
|
||||
<label key={option.label} className="flex items-center gap-2 text-sm">
|
||||
<input
|
||||
type="checkbox"
|
||||
name={`checkbox-${question.id}`}
|
||||
checked={option.checked}
|
||||
onChange={() => onChange(option.label === 'True')}
|
||||
onChange={() => onChange(option.label === 'Yes')}
|
||||
className="h-4 w-4 accent-brand-600"
|
||||
/>
|
||||
{option.label}
|
||||
|
|
|
|||
Loading…
Reference in New Issue