NejBlazor/Parts/InputParts/TextArea.razor
2023-03-08 17:00:38 +01:00

25 lines
642 B
Plaintext

<div class="my-1">
@if (!string.IsNullOrEmpty(Title))
{
<label class="block text-secondary text-sm font-bold mb-2">@Title</label>
}
<textarea id="@Id" name="@Name" class="bg-primary appearance-none border-2 border-secondary rounded w-full py-2 px-4 text-primary leading-tight focus:outline-none focus:bg-secondary focus:border-accent transition duration-150">
@ChildContent
</textarea>
</div>
@code {
[Parameter]
public RenderFragment ChildContent { get; set; } = default!;
[Parameter]
public string? Title { get; set; }
[Parameter]
public string? Id { get; set; }
[Parameter]
public string? Name { get; set; }
}