PlotDirector/PlotLine/Views/Locations/_LocationTabs.cshtml

13 lines
618 B
Plaintext

@model (IReadOnlyList<(string Id, string Label)> Tabs, string ActiveTab)
<nav class="nav nav-tabs mb-3" role="tablist" aria-label="Location workspace">
@foreach (var tab in Model.Tabs)
{
var active = tab.Id == Model.ActiveTab;
<button class="nav-link @(active ? "active" : null)" id="location-tab-@tab.Id"
type="button" role="tab" data-bs-toggle="tab" data-bs-target="#location-panel-@tab.Id"
aria-controls="location-panel-@tab.Id" aria-selected="@(active ? "true" : "false")"
tabindex="@(active ? null : "-1")">@tab.Label</button>
}
</nav>