Skip to content

Commit

Permalink
fix(SearchBar): fix clear button hover state
Browse files Browse the repository at this point in the history
Closes UXD-1692
  • Loading branch information
ajkl2533 committed Dec 13, 2024
1 parent 860dd1a commit be13732
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/components/forms/SearchBar/SearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
}
}
`;
Expand Down Expand Up @@ -205,7 +210,11 @@ const SearchBar = forwardRef<HTMLInputElement, SearchBarProps>(
as="button"
onClick={handleClearSearch}
>
<Icon name={SSCIconNames.times} type={IconTypes.ssc} />
<Icon
className="clear-button-icon"
name={SSCIconNames.times}
type={IconTypes.ssc}
/>
</ClearButton>
)}
</SearchBarRoot>
Expand Down

0 comments on commit be13732

Please sign in to comment.