blob: 483d0d670255cc6160a7077848f70f1d81985234 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
<link rel="stylesheet" href="@(nameof(HyperBooru)).styles.css"/>
@if(Parent.ActivePane == this) {
@ChildContent
}
@code {
[CascadingParameter]
private TabContainer Parent { get; set; }
[Parameter]
public string Title { get; set; }
[Parameter]
public RenderFragment ChildContent { get; set; }
protected override void OnInitialized() {
if (Parent is null)
throw new ArgumentNullException(nameof(Parent), "TabPane must exist within a TabContainer");
Parent.AddPane(this);
}
}
|