REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 2.60 KB
Close
/home/nshryvcy/radiantskinclinics.org/wp-content/plugins/extendify_old/src/Launch/components/Questionnaire.jsx
Text
Base64
import { Icon as QuestionIcon } from '@launch/components/QuestionIcon'; export const Questionnaire = ({ questions = [], onAnswerChange }) => { const getSelectedExtraField = (q, selected) => { if (!Array.isArray(q?.extraFields) || !selected) return null; return q?.extraFields.find((ef) => ef.key === selected) || null; }; return ( <div className="mx-auto flex max-w-full flex-col gap-6 lg:max-w-[961px]"> {questions.map((q) => { const selected = q?.answerUser || q?.answerAI; const selectedExtraField = getSelectedExtraField(q, selected); return ( <div className="flex flex-col gap-3 rounded-sm bg-[#f8f8f8] p-6" key={q.id} > <p className="m-0 text-base font-medium text-extendify-black"> {q?.translatedQuestion || q?.question} </p> {q?.description && ( <p className="mb-0 ml-0 mr-0 mt-[-8px] p-0 text-sm font-normal text-gray-700"> {q?.description} </p> )} <div className="flex flex-wrap gap-5"> {q?.answerOptions.map((answer) => ( <button key={answer?.id} type="button" onClick={() => onAnswerChange?.(q?.id, answer?.id)} className={[ selected === answer?.id ? 'border-2 border-design-main font-medium text-design-main before:absolute before:inset-0 before:bg-design-main before:opacity-[0.06] before:content-[""]' : 'border border-gray-200 bg-white font-normal', 'relative flex w-full max-w-full items-center gap-2 rounded-md px-3 py-3 text-left text-sm transition-colors duration-150 focus:outline-hidden md:max-w-[291px]', ].join(' ')} > <QuestionIcon id={answer?.iconId} /> {answer?.translatedLabel || answer?.label} </button> ))} </div> {selectedExtraField && ( <div className="mt-2"> <label className="mb-3 block text-base font-medium text-extendify-black" htmlFor={`extra-field-${q.id}`} > {selectedExtraField?.translatedQuestion || selectedExtraField?.question} </label> <input id={`extra-field-${q.id}`} type={selectedExtraField?.type || 'text'} placeholder="www.example.com" value={selectedExtraField?.answer || ''} onChange={(e) => onAnswerChange?.(q?.id, e.target.value, { isExtraField: true, extraFieldKey: selectedExtraField?.key, }) } className="w-full max-w-[602px] rounded-sm border border-gray-300 px-2 py-2 outline-hidden" /> </div> )} </div> ); })} </div> ); };
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 3 × Files: 15
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
BusinessInformation
DIR
-
drwxr-xr-x
2026-04-28 02:40:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
CreatingSite
DIR
-
drwxr-xr-x
2026-04-28 02:40:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
QuestionIcon
DIR
-
drwxr-xr-x
2026-04-28 02:40:02
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Card.jsx
1.50 KB
lrw-r--r--
2026-02-19 03:27:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
CheckboxInput.jsx
1.47 KB
lrw-r--r--
2026-02-19 03:27:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
CheckboxInputCard.jsx
1.34 KB
lrw-r--r--
2026-02-19 03:27:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
LoadingIndicator.jsx
188 B
lrw-r--r--
2023-11-14 08:13:36
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
NavigationButton.jsx
354 B
lrw-r--r--
2026-02-19 03:27:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
PageControl.jsx
11.59 KB
lrw-r--r--
2026-02-19 03:27:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
PagePreview.jsx
8.13 KB
lrw-r--r--
2026-02-19 03:27:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
PageSelectButton.jsx
1.03 KB
lrw-r--r--
2026-02-19 03:27:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
PageSelectButtonPlaceholder.jsx
400 B
lrw-r--r--
2026-02-19 03:27:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Questionnaire.jsx
2.60 KB
lrw-r--r--
2026-02-19 03:27:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
RestartLaunchModal.jsx
6.71 KB
lrw-r--r--
2026-02-27 04:48:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
RetryNotice.jsx
581 B
lrw-r--r--
2024-07-16 23:59:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
SmallPreview.jsx
7.53 KB
lrw-r--r--
2026-02-19 03:27:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Title.jsx
416 B
lrw-r--r--
2024-10-08 14:19:28
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
VideoPlayer.jsx
775 B
lrw-r--r--
2026-02-19 03:27:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).