diff options
| author | Nikhil M Warrier <nikhilmw.dev@gmail.com> | 2026-03-15 19:42:08 +0530 |
|---|---|---|
| committer | Nikhil M Warrier <nikhilmw.dev@gmail.com> | 2026-03-15 19:42:08 +0530 |
| commit | 7ddd723e299c3331412785c3631ff19b40093e67 (patch) | |
| tree | b825f31c2bc198968c98617a21f0434b6823e46e | |
| parent | e9bf6fb3ab0efa27993e87498c4f64833d77eb22 (diff) | |
Hotfix: Render required asterisk properly
| -rw-r--r-- | src/components/FormField.astro | 10 |
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} <span class="text-primary/30">*</span> + { + field.required ? ( + <> + {field.label} <span class="text-primary/30">*</span> + </> + ) : ( + field.label + ) + } </label> { |
