ant-design-blazor/components/layout/Sider.razor

23 lines
743 B
C#

@namespace AntDesign
@inherits AntDomComponentBase
<aside class="@ClassMapper.Class" style="@SiderStyles @Style">
@if (_showTrigger && CollapsedWidth == 0 && !NoTrigger)
{
<span class="ant-layout-sider-zero-width-trigger ant-layout-sider-zero-width-trigger-left"
@onclick="ToggleCollapsed">
<Icon Type="bars" />
</span>
}
<CascadingValue Value="this" IsFixed="@true">
<div class="ant-layout-sider-children">
@ChildContent
</div>
</CascadingValue>
@if (Collapsible && !NoTrigger)
{
<div class="ant-layout-sider-trigger" style="width: @($"{ComputedWidth}px")" @onclick="ToggleCollapsed">
@Trigger
</div>
}
</aside>