Skip to content

Commit

Permalink
🎨 Fixed size of error messaging.
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharth-shringarpure committed Oct 27, 2024
1 parent 3f2a7af commit 6830708
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions components/custom/EventForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@ const EventForm = ({ onSubmit }: EventFormProps) => {
<div>
<Label htmlFor="name">Event Name</Label>
<Input id="name" {...register('name')} />
{errors.name && <p className="text-red-500">{errors.name.message}</p>}
{errors.name && <p className="text-red-500 text-sm">{errors.name.message}</p>}
</div>

{/* Description Field */}
<div>
<Label htmlFor="description">Description</Label>
<Textarea id="description" {...register('description')} />
{errors.description && (
<p className="text-red-500">{errors.description.message}</p>
<p className="text-red-500 text-sm">{errors.description.message}</p>
)}
</div>

Expand All @@ -123,7 +123,7 @@ const EventForm = ({ onSubmit }: EventFormProps) => {
{...register('capacity', { valueAsNumber: true })}
/>
{errors.capacity && (
<p className="text-red-500">{errors.capacity.message}</p>
<p className="text-red-500 text-sm">{errors.capacity.message}</p>
)}
</div>

Expand All @@ -135,7 +135,7 @@ const EventForm = ({ onSubmit }: EventFormProps) => {
{...register('ticketPrice', { valueAsNumber: true })}
/>
{errors.ticketPrice && (
<p className="text-red-500">{errors.ticketPrice.message}</p>
<p className="text-red-500 text-sm">{errors.ticketPrice.message}</p>
)}
</div>

Expand All @@ -144,7 +144,7 @@ const EventForm = ({ onSubmit }: EventFormProps) => {
<Label htmlFor="description">Location</Label>
<Textarea id="description" {...register('location')} />
{errors.description && (
<p className="text-red-500">{errors.description.message}</p>
<p className="text-red-500 text-sm">{errors.description.message}</p>
)}
</div>

Expand All @@ -159,7 +159,7 @@ const EventForm = ({ onSubmit }: EventFormProps) => {
max="2100-12-31T23:59"
/>
{errors.eventStartTime && (
<p className="text-red-500">{errors.eventStartTime.message}</p>
<p className="text-red-500 text-sm">{errors.eventStartTime.message}</p>
)}
</div>

Expand All @@ -174,7 +174,7 @@ const EventForm = ({ onSubmit }: EventFormProps) => {
max="2100-12-31T23:59"
/>
{errors.eventEndTime && (
<p className="text-red-500">{errors.eventEndTime.message}</p>
<p className="text-red-500 text-sm">{errors.eventEndTime.message}</p>
)}
</div>

Expand Down Expand Up @@ -209,7 +209,7 @@ const EventForm = ({ onSubmit }: EventFormProps) => {
if (imgError) {
const message = imgError.message || 'Invalid image URL';
return (
<p key={index} className="text-red-500">
<p key={index} className="text-red-500 text-sm">
Image {index + 1}: {message}
</p>
);
Expand Down

0 comments on commit 6830708

Please sign in to comment.