Merge pull request #3523 from beolafsen/dev
Extend the Section component with "IsVisible" parameter
This commit is contained in:
commit
3c7ee65b7d
|
@ -1,6 +1,8 @@
|
||||||
@namespace Oqtane.Modules.Controls
|
@namespace Oqtane.Modules.Controls
|
||||||
@inherits LocalizableComponent
|
@inherits LocalizableComponent
|
||||||
|
|
||||||
|
@if (IsVisible)
|
||||||
|
{
|
||||||
<div class="d-flex mt-2">
|
<div class="d-flex mt-2">
|
||||||
<div>
|
<div>
|
||||||
<a data-bs-toggle="collapse" class="app-link-unstyled" href="#@Name" aria-expanded="@_expanded" aria-controls="@Name" @onclick:preventDefault="true">
|
<a data-bs-toggle="collapse" class="app-link-unstyled" href="#@Name" aria-expanded="@_expanded" aria-controls="@Name" @onclick:preventDefault="true">
|
||||||
|
@ -22,6 +24,7 @@
|
||||||
@ChildContent
|
@ChildContent
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
private string _heading = string.Empty;
|
private string _heading = string.Empty;
|
||||||
|
@ -40,6 +43,9 @@
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public string Expanded { get; set; } // optional - will default to false if not provided
|
public string Expanded { get; set; } // optional - will default to false if not provided
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public bool IsVisible { get; set; } = true;
|
||||||
|
|
||||||
protected override void OnParametersSet()
|
protected override void OnParametersSet()
|
||||||
{
|
{
|
||||||
base.OnParametersSet(); // must be included to call method in LocalizableComponent
|
base.OnParametersSet(); // must be included to call method in LocalizableComponent
|
||||||
|
|
Loading…
Reference in New Issue
Block a user