Skip to content

Commit 4798fed

Browse files
author
raineer
committed
PR: Survey Page Styling & Image Thumbnail Fix auto extend membership
1 parent 7b45aa9 commit 4798fed

7 files changed

Lines changed: 647 additions & 1552 deletions

File tree

‎apps/codebility/app/home/settings/surveys/[surveyId]/_components/QuestionForm.tsx‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export default function QuestionForm({ question, onSubmit, onCancel, loading }:
121121
};
122122

123123
return (
124-
<form onSubmit={handleSubmit(handleFormSubmit)} className="space-y-6">
124+
<form onSubmit={handleSubmit(handleFormSubmit)} className="space-y-[clamp(1rem,2vw,1.5rem)]">
125125
{/* Question Type */}
126126
<div className="space-y-2">
127127
<Label htmlFor="question_type" className="text-foreground dark:text-gray-300">Question Type *</Label>
@@ -156,7 +156,7 @@ export default function QuestionForm({ question, onSubmit, onCancel, loading }:
156156
className="rounded"
157157
/>
158158
{errors.question_text && (
159-
<p className="text-sm text-red-600 dark:text-red-400">{errors.question_text.message}</p>
159+
<p className="text-[clamp(0.875rem,1.8vw,1rem)] text-red-600 dark:text-red-400">{errors.question_text.message}</p>
160160
)}
161161
</div>
162162

@@ -176,7 +176,7 @@ export default function QuestionForm({ question, onSubmit, onCancel, loading }:
176176
{needsOptions && (
177177
<div className="space-y-2">
178178
<Label className="text-foreground dark:text-gray-300">Options *</Label>
179-
<div className="space-y-2">
179+
<div className="space-y-[clamp(0.5rem,1vw,0.75rem)]">
180180
{options.map((option, index) => (
181181
<div key={index} className="flex items-center gap-2">
182182
<Input
@@ -220,14 +220,14 @@ export default function QuestionForm({ question, onSubmit, onCancel, loading }:
220220
</div>
221221
</div>
222222
{options.length === 0 && (
223-
<p className="text-sm text-red-600 dark:text-red-400">At least one option is required</p>
223+
<p className="text-[clamp(0.875rem,1.8vw,1rem)] text-red-600 dark:text-red-400">At least one option is required</p>
224224
)}
225225
</div>
226226
)}
227227

228228
{/* Rating Scale Settings */}
229229
{needsRating && (
230-
<div className="grid grid-cols-2 gap-4">
230+
<div className="grid grid-cols-2 gap-[clamp(0.75rem,1.5vw,1rem)]">
231231
<div className="space-y-2">
232232
<Label htmlFor="min_rating" className="text-foreground dark:text-gray-300">Min Rating</Label>
233233
<Input
@@ -298,4 +298,4 @@ export default function QuestionForm({ question, onSubmit, onCancel, loading }:
298298
</div>
299299
</form>
300300
);
301-
}
301+
}

0 commit comments

Comments
 (0)