oqtane.framework/Oqtane.Client/Modules/Controls/TabPanel.razor
Shaun Walker d8b15e7a4e
Components based on Bootstrap4 for Sections and TabStrip to increase productivity and promote uniformity in Module UIs (#333)
* upgrade to .NET Core 3.2 Preview 3 and fixes for issues created by #314

* Components based on Bootstrap4 for Sections and  TabStrip to increase productivity and promote uniformity in Module UIs
2020-04-03 15:04:25 -04:00

36 lines
773 B
Plaintext

@namespace Oqtane.Modules.Controls
@inherits ModuleBase
@if (Name == Parent.ActiveTab)
{
<div id="@Name" class="tab-pane fade show active" role="tabpanel">
@ChildContent
</div>
}
else
{
<div id="@Name" class="tab-pane fade" role="tabpanel">
@ChildContent
</div>
}
@code {
[CascadingParameter]
private TabStrip Parent { get; set; }
[Parameter]
public RenderFragment ChildContent { get; set; }
[Parameter]
public string Name { get; set; } // required - name of the TabPanel
[Parameter]
public string Heading { get; set; } // optional - defaults to name if not specified
protected override void OnInitialized()
{
base.OnInitialized();
Parent.AddTabPanel((TabPanel)this);
}
}