Skip to content

Commit 280f6ab

Browse files
committed
refactor: 增加判断条件
1 parent 1c91fa8 commit 280f6ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/BootstrapBlazor/Components/Drawer/Drawer.razor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public partial class Drawer
1919
.Build();
2020

2121
private string? StyleString => CssBuilder.Default()
22-
.AddClass($"--bb-drawer-position: {Position};")
22+
.AddClass($"--bb-drawer-position: {Position};", !string.IsNullOrEmpty(Position))
2323
.AddClass($"--bb-drawer-zindex: {ZIndex};", ZIndex.HasValue)
2424
.AddStyleFromAttributes(AdditionalAttributes)
2525
.Build();

0 commit comments

Comments
 (0)