Instrumento v2: 44 preguntas + widget text_short

This commit is contained in:
markosbenitez
2026-06-04 14:30:28 -03:00
parent 10c665d25c
commit d91ea6b2ff
11 changed files with 765 additions and 751 deletions

View File

@@ -4,6 +4,7 @@ import { RadioGroup } from './widgets/radio-group'
import { CheckboxGroup } from './widgets/checkbox-group'
import { RatingScale } from './widgets/rating-scale'
import { TextAreaField } from './widgets/text-area-field'
import { TextShortField } from './widgets/text-short-field'
interface QuestionRendererProps {
question: Question
@@ -72,7 +73,20 @@ export function QuestionRenderer({
)
}
if (type === 'text_long' || type === 'text_short') {
if (type === 'text_short') {
return (
<TextShortField
name={code}
label={prompt}
value={(answers[code] as string) ?? ''}
required={required}
onChange={(v) => onChange(code, v)}
error={error}
/>
)
}
if (type === 'text_long') {
return (
<TextAreaField
name={code}