SickApp/SickBlazorApp/Components/AccordionItem.razor
2026-02-02 10:00:26 +07:00

19 lines
594 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div class="accordion-item level-@Level">
<div class="accordion-header" @onclick="OnToggle">
<span>@Title</span>
<span class="icon">@((IsOpen) ? "" : "+")</span>
</div>
<div class="accordion-content @(IsOpen ? "open" : "")">
@ChildContent
</div>
</div>
@code {
[Parameter] public string Title { get; set; } = "";
[Parameter] public bool IsOpen { get; set; }
[Parameter] public int Level { get; set; } = 0;
[Parameter] public EventCallback OnToggle { get; set; }
[Parameter] public RenderFragment? ChildContent { get; set; }
}