From be13732cd10e0fc24c872751d97ebf445454f6e6 Mon Sep 17 00:00:00 2001 From: Radek Podrazky Date: Fri, 13 Dec 2024 16:33:42 +0100 Subject: [PATCH] fix(SearchBar): fix clear button hover state Closes UXD-1692 --- src/components/forms/SearchBar/SearchBar.tsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/components/forms/SearchBar/SearchBar.tsx b/src/components/forms/SearchBar/SearchBar.tsx index 38f7e16e9..f8e09b921 100644 --- a/src/components/forms/SearchBar/SearchBar.tsx +++ b/src/components/forms/SearchBar/SearchBar.tsx @@ -52,6 +52,11 @@ const ClearButton = styled(IconWrapper)` border-radius: 0; cursor: pointer; + .clear-button-icon { + position: relative; + z-index: 1; + } + &:hover, &:focus { color: var(--sscds-color-icon-inverse); @@ -66,7 +71,7 @@ const ClearButton = styled(IconWrapper)` height: 24px; border-radius: 100%; background-color: var(--sscds-color-background-action-danger-hover); - z-index: -1; + z-index: 0; } } `; @@ -205,7 +210,11 @@ const SearchBar = forwardRef( as="button" onClick={handleClearSearch} > - + )}