2021-01-07 22:49:10 -05:00

23 lines
384 B
Plaintext

@if (Errors.Count == 0)
{
@ChildContent
}
else
{
<p>The following error@(Errors.Count == 1 ? "" : "s") occurred:</p>
<ul>
@foreach (var msg in Errors)
{
<li><pre>@msg</pre></li>
}
</ul>
}
@code {
[Parameter]
public IList<string> Errors { get; set; } = default!;
[Parameter]
public RenderFragment ChildContent { get; set; } = default!;
}