Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/layout/src/BasicLayout.razor.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
Expand Down Expand Up @@ -42,6 +42,7 @@
[Parameter] public OneOf<string, RenderFragment> Logo { get; set; }
[Parameter] public string BaseURL { get; set; } = "";
[Parameter] public int SiderWidth { get; set; } = 208;
[Parameter] public int FoldedSiderWidth { get; set; } = 48;
[Parameter] public RenderFragment MenuExtraRender { get; set; }
[Parameter] public bool MenuAccordion { get; set; }
[Parameter] public RenderFragment<bool> CollapsedButtonRender { get; set; }
Expand Down Expand Up @@ -80,7 +81,7 @@
protected void SetStyle()
{
var hasLeftPadding = FixSiderbar && Layout != Layout.Top && !IsMobile;
var paddingLeft = hasLeftPadding ? Collapsed ? 48 : SiderWidth : 0;
var paddingLeft = hasLeftPadding ? Collapsed ? FoldedSiderWidth : SiderWidth : 0;

_genLayoutStyle = MenuRender ? $"padding-left: {paddingLeft}px; position: relative;" : "";
_weakModeStyle = ColorWeak ? "filter: invert(80%);" : "";
Expand Down Expand Up @@ -126,4 +127,4 @@

}
}
}
}