fix: survey editor minor css bug fixes (#1287)

This commit is contained in:
Shubham Palriwala
2023-10-18 20:22:21 +05:30
committed by GitHub
parent 8074d324d4
commit 9eae65db44
2 changed files with 15 additions and 5 deletions
@@ -247,15 +247,22 @@ export default function QuestionCard({
id="buttonLabel"
name="buttonLabel"
value={question.buttonLabel}
maxLength={48}
placeholder={lastQuestion ? "Finish" : "Next"}
onChange={(e) => updateQuestion(questionIdx, { buttonLabel: e.target.value })}
onChange={(e) => {
if (e.target.value.trim() == "") e.target.value = "";
updateQuestion(questionIdx, { buttonLabel: e.target.value });
}}
/>
</div>
</div>
{questionIdx !== 0 && (
<BackButtonInput
value={question.backButtonLabel}
onChange={(e) => updateQuestion(questionIdx, { backButtonLabel: e.target.value })}
onChange={(e) => {
if (e.target.value.trim() == "") e.target.value = "";
updateQuestion(questionIdx, { backButtonLabel: e.target.value });
}}
/>
)}
</div>
@@ -265,7 +272,10 @@ export default function QuestionCard({
<div className="mt-4">
<BackButtonInput
value={question.backButtonLabel}
onChange={(e) => updateQuestion(questionIdx, { backButtonLabel: e.target.value })}
onChange={(e) => {
if (e.target.value.trim() == "") e.target.value = "";
updateQuestion(questionIdx, { backButtonLabel: e.target.value });
}}
/>
</div>
)}
@@ -167,8 +167,8 @@ export default function RatingQuestion({
))}
</div>
<div className="flex justify-between px-1.5 text-xs leading-6 text-slate-500">
<p>{question.lowerLabel}</p>
<p>{question.upperLabel}</p>
<p className="w-1/2 text-left">{question.lowerLabel}</p>
<p className="w-1/2 text-right">{question.upperLabel}</p>
</div>
</fieldset>
</div>