Skip to content

Commit

Permalink
[HxSearchBox] Icon consolidation
Browse files Browse the repository at this point in the history
  • Loading branch information
Harvey1214 committed Mar 17, 2023
1 parent 4576f1b commit 9c52ea1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
placeholder="@Placeholder"
class="@CssClassHelper.Combine(
"form-control",
(HasInputGroupEnd && HasInputGroups ? "hx-search-box-input-with-search-icon" : null),
(!HasInputGroupEnd && HasInputGroups ? "hx-search-box-input-with-search-icon" : null),
InputCssClassEffective)" />

@if (!string.IsNullOrEmpty(Label) && LabelType == Havit.Blazor.Components.Web.Bootstrap.LabelType.Floating)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Havit.Blazor.Components.Web.Bootstrap.Internal;
using Microsoft.Extensions.Localization;
using Microsoft.JSInterop;

namespace Havit.Blazor.Components.Web.Bootstrap;
Expand Down Expand Up @@ -209,7 +210,8 @@ public partial class HxSearchBox<TItem> : IAsyncDisposable

[Inject] protected IJSRuntime JSRuntime { get; set; }

protected bool HasInputGroups => !String.IsNullOrWhiteSpace(InputGroupStartText) || !String.IsNullOrWhiteSpace(InputGroupEndText) || (InputGroupStartTemplate is not null) || (InputGroupEndTemplate is not null);
protected bool HasInputGroups => HasInputGroupStart || HasInputGroupEnd;
private bool HasInputGroupStart => !String.IsNullOrWhiteSpace(InputGroupStartText) || (InputGroupStartTemplate is not null);
private bool HasInputGroupEnd => !String.IsNullOrWhiteSpace(InputGroupEndText) || (InputGroupEndTemplate is not null);

private string dropdownToggleElementId = "hx" + Guid.NewGuid().ToString("N");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
right: .75rem;
}

::deep .hx-search-box-input-with-search-icon {
border-top-right-radius: 0.375rem !important;
border-bottom-right-radius: 0.375rem !important;
}

.dropdown-item:not(:active) ::deep .hx-search-box-item-title {
color: var(--hx-search-box-item-title-color);
}
Expand Down

0 comments on commit 9c52ea1

Please sign in to comment.