aboutsummaryrefslogtreecommitdiffstats
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-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>
{