Skip to content

Commit

Permalink
conditionaly show clear btn
Browse files Browse the repository at this point in the history
  • Loading branch information
SorinC6 committed Mar 15, 2024
1 parent 88fa3a5 commit 622fe26
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/SearchRevamp.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ const SearchRevamp = ({ filter }: Props): Node => {
placeholder="Search stake pool"
type="text"
/>
{searchValue.length > 0 &&
<ClearBtn
onClick={(e) => {
setSearchValue('');
Expand All @@ -107,6 +108,8 @@ const SearchRevamp = ({ filter }: Props): Node => {
>
<img src={closeIcon} alt="Clear Input" />
</ClearBtn>
}

</Form>
);
};
Expand Down

0 comments on commit 622fe26

Please sign in to comment.