Files
Enciphered.Blazor.UIComponents/Enciphered.Blazor.UIComponents/Layout/Sidebar/SidebarTrigger.razor
T
2026-04-13 15:08:49 +05:00

25 lines
946 B
Plaintext

@namespace Enciphered.Blazor.UIComponents
<button data-sidebar-trigger
type="button"
class="inline-flex items-center justify-center rounded-md p-2 text-sidebar-foreground transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sidebar-ring @Class">
@if (ChildContent is not null)
{
@ChildContent
}
else
{
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect width="18" height="18" x="3" y="3" rx="2" />
<path d="M9 3v18" />
</svg>
}
<span class="sr-only">Toggle Sidebar</span>
</button>
@code {
[Parameter] public RenderFragment? ChildContent { get; set; }
[Parameter] public string? Class { get; set; }
}