aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikhil M Warrier <nikhilmw.dev@gmail.com>2026-03-15 19:42:08 +0530
committerNikhil M Warrier <nikhilmw.dev@gmail.com>2026-03-15 19:42:08 +0530
commit7ddd723e299c3331412785c3631ff19b40093e67 (patch)
treeb825f31c2bc198968c98617a21f0434b6823e46e
parente9bf6fb3ab0efa27993e87498c4f64833d77eb22 (diff)
Hotfix: Render required asterisk properly
-rw-r--r--src/components/FormField.astro10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/components/FormField.astro b/src/components/FormField.astro
index cdb7649..64b4d7d 100644
--- a/src/components/FormField.astro
+++ b/src/components/FormField.astro
@@ -11,7 +11,15 @@ const fieldType = field.type as astroHTML.JSX.HTMLInputTypeAttribute
<div class="flex w-full flex-col gap-2">
<label for={field.id} class="text-muted-foreground pl-1">
- {field.label}&nbsp;<span class="text-primary/30">*</span>
+ {
+ field.required ? (
+ <>
+ {field.label}&nbsp;<span class="text-primary/30">*</span>
+ </>
+ ) : (
+ field.label
+ )
+ }
</label>
{