From c17c2bc68550742964b6cf7d7b2082108ab1c523 Mon Sep 17 00:00:00 2001 From: Saleh Yusefnejad Date: Wed, 25 Sep 2024 22:13:28 +0330 Subject: [PATCH] fix IconOnly issues of BitNav #8732 --- .../Bit.BlazorUI/Components/Navs/Nav/BitNav.scss | 10 +++++++++- .../Components/Navs/Nav/_BitNavChild.razor | 2 +- .../Components/Navs/Nav/_BitNavChild.razor.cs | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/BlazorUI/Bit.BlazorUI/Components/Navs/Nav/BitNav.scss b/src/BlazorUI/Bit.BlazorUI/Components/Navs/Nav/BitNav.scss index ad498fcb6d..8c24b86c6e 100644 --- a/src/BlazorUI/Bit.BlazorUI/Components/Navs/Nav/BitNav.scss +++ b/src/BlazorUI/Bit.BlazorUI/Components/Navs/Nav/BitNav.scss @@ -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 { diff --git a/src/BlazorUI/Bit.BlazorUI/Components/Navs/Nav/_BitNavChild.razor b/src/BlazorUI/Bit.BlazorUI/Components/Navs/Nav/_BitNavChild.razor index 8b5e8a7024..2fcf3436f6 100644 --- a/src/BlazorUI/Bit.BlazorUI/Components/Navs/Nav/_BitNavChild.razor +++ b/src/BlazorUI/Bit.BlazorUI/Components/Navs/Nav/_BitNavChild.razor @@ -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)); diff --git a/src/BlazorUI/Bit.BlazorUI/Components/Navs/Nav/_BitNavChild.razor.cs b/src/BlazorUI/Bit.BlazorUI/Components/Navs/Nav/_BitNavChild.razor.cs index 7df0cfa3c7..0e1e4e7304 100644 --- a/src/BlazorUI/Bit.BlazorUI/Components/Navs/Nav/_BitNavChild.razor.cs +++ b/src/BlazorUI/Bit.BlazorUI/Components/Navs/Nav/_BitNavChild.razor.cs @@ -72,7 +72,7 @@ private string GetItemContainerStyles() { var styles = new List(); - if (Nav.FullWidth is false) + if (Nav.FullWidth is false && Nav.IconOnly is false) { styles.Add($"padding-inline-end:{Nav.IndentPadding}px;"); }