Files
radzen-blazor/Radzen.Blazor/RadzenTabsItem.razor
2026-01-12 09:50:09 +02:00

22 lines
846 B
Plaintext

@using Radzen.Blazor.Rendering
@implements IDisposable
@if ((Tabs?.RenderMode == TabRenderMode.Server ? Visible : true))
{
<li role="tab" @attributes=@Attributes style=@getStyle() class=@Class
aria-selected=@(IsSelected ? "true" : "false") aria-controls="@($"{Tabs?.Id ?? ""}-tabpanel-{Index}")">
<a @onclick=@OnClick @onclick:preventDefault="true" id="@($"{Tabs?.Id ?? ""}-tabpanel-{Index}-label")" @onkeydown:stopPropagation>
@if (!string.IsNullOrEmpty(Icon))
{
<span class="notranslate rzi rz-tabview-icon" style="@(!string.IsNullOrEmpty(IconColor) ? $"color:{IconColor}" : null)">@Icon</span>
}
@if (Template != null)
{
@Template(this)
}
else
{
<span class="rz-tabview-title">@Text</span>
}
</a>
</li>
}