Skip to content

Commit

Permalink
fix IconOnly issues of BitNav #8732
Browse files Browse the repository at this point in the history
  • Loading branch information
msynk committed Sep 25, 2024
1 parent d720e58 commit c17c2bc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
10 changes: 9 additions & 1 deletion src/BlazorUI/Bit.BlazorUI/Components/Navs/Nav/BitNav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,20 @@
.bit-nav-ion {
.bit-nav-ict {
width: fit-content;
padding: spacing(2) !important;
}

.bit-nav-itm {
padding: 1rem;
font-size: 1rem;
}

.bit-nav-itx {
display: none;
}

.bit-nav-sel {
border: none;
}
}

.bit-nav-sel {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
}
else
{
var padding = childItems.Any()
var padding = Nav.IconOnly ? 0 : childItems.Any()
? (Depth * Nav.IndentValue + (Nav.ReversedChevron ? Nav.IndentReversedPadding : 0))
: (Depth * Nav.IndentValue + (Nav.ReversedChevron ? Nav.IndentReversedPadding : Nav.IndentPadding));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ private string GetItemContainerStyles()
{
var styles = new List<string>();

if (Nav.FullWidth is false)
if (Nav.FullWidth is false && Nav.IconOnly is false)
{
styles.Add($"padding-inline-end:{Nav.IndentPadding}px;");
}
Expand Down

0 comments on commit c17c2bc

Please sign in to comment.