@namespace Lumeo

@if (FieldContext?.HasError == true)
{
    <p class="@CssClass" @attributes="AdditionalAttributes">
        @FieldContext.Error
    </p>
}

@code {
    [CascadingParameter] public FormField.FormFieldContext? FieldContext { get; set; }
    [Parameter] public string? Class { get; set; }
    [Parameter(CaptureUnmatchedValues = true)] public Dictionary<string, object>? AdditionalAttributes { get; set; }

    private string CssClass => $"text-[0.8rem] font-medium text-destructive {Class}".Trim();
}
