Skip to content

Commit

Permalink
🐛 fix(MDivider): cannot be displayed in some cases (#500)
Browse files Browse the repository at this point in the history
  • Loading branch information
capdiem authored Jun 10, 2022
1 parent 84e13cb commit dacdcbf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Masa.Blazor/Components/Divider/MDivider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ protected override void SetComponentClass()
}, styleBuilder =>
{
styleBuilder
.AddIf("display:contents", () => !HasContent)
.AddIf("height: 100%", () => Vertical)
.AddIf($"padding: {PaddingY}px 0", () => PaddingY > 0);
})
Expand All @@ -50,13 +51,15 @@ protected override void SetComponentClass()
.Add("m-divider")
.AddIf($"{prefix}--inset", () => Inset)
.AddIf($"{prefix}--vertical", () => Vertical)
.AddIf(Class, () => !HasContent)
.AddTheme(IsDark);
})
.Apply("content", cssBuilder =>
{
cssBuilder
.Add($"{prefix}__content")
.AddIf($"{prefix}--inset", () => Inset)
.AddIf(Style, () => !HasContent)
.AddTheme(IsDark);
});
}
Expand Down

0 comments on commit dacdcbf

Please sign in to comment.