From e418d3d75d72d71a49a7fdd5882df6f7b7e869ad Mon Sep 17 00:00:00 2001 From: Matt Bemis Date: Tue, 17 Dec 2024 08:14:59 -0500 Subject: [PATCH 1/3] add freetext editor to survey designer --- .../forms/designer/split/FreetextEditor.tsx | 34 +++++++++++++++++++ .../split/SplitFormElementDesigner.tsx | 34 ++++++++++++++----- .../split/controls/FormElementOptions.tsx | 12 ++++++- 3 files changed, 70 insertions(+), 10 deletions(-) create mode 100644 ui-admin/src/forms/designer/split/FreetextEditor.tsx diff --git a/ui-admin/src/forms/designer/split/FreetextEditor.tsx b/ui-admin/src/forms/designer/split/FreetextEditor.tsx new file mode 100644 index 0000000000..7993b5e608 --- /dev/null +++ b/ui-admin/src/forms/designer/split/FreetextEditor.tsx @@ -0,0 +1,34 @@ +import { Question, QuestionType } from '@juniper/ui-core' +import React, { useState } from 'react' +import { Textarea } from 'components/forms/Textarea' +import { questionFromRawText } from '../../../util/juniperSurveyUtils' + +export const FreetextEditor = ({ question, onChange }: { + question: Question, onChange: (newQuestion: Question) => void +}) => { + const [freetext, setFreetext] = useState('') + + return