Implemented navigation shelf with nav draweer button

This commit is contained in:
Khwezi Mngoma
2026-05-16 11:57:01 +02:00
parent bf2e7e142d
commit 45da04bb18
5 changed files with 276 additions and 7 deletions
+18 -3
View File
@@ -9,7 +9,7 @@
<circle cx="75" cy="80" r="5" fill="#4dabff" opacity="0.6" />
<circle cx="75" cy="20" r="5" fill="#4dabff" opacity="0.6" />
</svg>
<div class="text-column">
<span class="brand-main">Lite<span class="brand-accent">Charms</span></span>
<span class="payoff-line">Shop Admin Console</span>
@@ -17,10 +17,25 @@
</a>
</header>
<div class="page-wrapper">
<NavShelf IsOpen="isShelfExpanded" IsOpenChanged="OnShelfStateChanged" @rendermode="InteractiveServer" />
<div class="page-wrapper @(isShelfExpanded ? "shifted-canvas" : "")">
<main>
@Body
</main>
</div>
<BlazoredToasts />
<BlazoredToasts />
@code {
private bool isShelfExpanded { get; set; } = false;
private void OnShelfStateChanged(bool newState)
{
isShelfExpanded = newState;
// This forces Blazor to re-evaluate the DOM, instantly applying
// the "shelf-open" and "shifted-canvas" CSS utility classes.
StateHasChanged();
}
}