@namespace Oqtane.Modules.Controls @inherits LocalizableComponent @if (IsVisible) {
@_heading
 

@if (ChildContent != null) { @ChildContent }
} @code { private string _heading = string.Empty; private string _expanded = string.Empty; private string _show = string.Empty; [Parameter] public RenderFragment ChildContent { get; set; } = null; [Parameter] public string Name { get; set; } // required - the name of the section [Parameter] public string Heading { get; set; } // optional - will default to Name if not provided [Parameter] public string Expanded { get; set; } // optional - will default to false if not provided [Parameter] public bool IsVisible { get; set; } = true; protected override void OnParametersSet() { base.OnParametersSet(); // must be included to call method in LocalizableComponent _heading = !string.IsNullOrEmpty(Heading) ? Localize(nameof(Heading), Heading) : Localize(nameof(Name), Name); _expanded = (!string.IsNullOrEmpty(Expanded)) ? Expanded.ToLower() : "false"; if (_expanded == "true") { _show = "show"; } } }