style: move button

This commit is contained in:
2026-07-27 19:16:56 +07:00 Unverified
parent bc856402e9
commit 1be1932814
6 changed files with 159 additions and 40 deletions
+16 -11
View File
@@ -473,7 +473,7 @@ export default function FormEditorClient({ form, initialQuestions }: FormEditorC
</div>
</div>
<div className="space-y-2">
<div className="flex flex-wrap items-center gap-4">
{q.imageUrl ? (
<div className="relative max-w-full h-auto inline-block shrink-0 group">
<Image
@@ -517,6 +517,21 @@ export default function FormEditorClient({ form, initialQuestions }: FormEditorC
/>
</div>
)}
<div className="flex items-center gap-2">
<Switch
id={`required-${q.id}`}
checked={q.required}
onCheckedChange={(checked) =>
handleUpdateQuestion(q.id, { required: checked })
}
/>
<Label
htmlFor={`required-${q.id}`}
className="text-sm font-normal text-muted-foreground"
>
Required
</Label>
</div>
</div>
{(q.type === "radio" || q.type === "checkbox") && (
@@ -557,16 +572,6 @@ export default function FormEditorClient({ form, initialQuestions }: FormEditorC
<div className="flex justify-between items-center pt-2 border-t border-border">
<div className="flex items-center flex-wrap gap-6">
<div className="flex items-center gap-2">
<Switch
id={`required-${q.id}`}
checked={q.required}
onCheckedChange={(checked) => handleUpdateQuestion(q.id, { required: checked })}
/>
<Label htmlFor={`required-${q.id}`} className="text-sm font-normal text-muted-foreground">
Required
</Label>
</div>
{(q.type === "radio" || q.type === "checkbox") && (
<div className="flex items-center gap-2">
<Switch