Skip to content

Commit b1fceae

Browse files
authoredFeb 18, 2025··
Hide clear button when input is empty (#2046)
1 parent 9544064 commit b1fceae

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed
 

Diff for: ‎.changeset/purple-timers-cry.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@theguild/components': patch
3+
---
4+
5+
Hide clear button when marketplace input is empty'

Diff for: ‎packages/components/src/components/marketplace-search.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,8 @@ function MarketplaceSearchInput({
151151
onClick={() => onChange('')}
152152
// A builtin clear-button can't be tabbed to. A keyboard user can cmd+A and delete.
153153
tabIndex={-1}
154-
className="flex size-6 items-center justify-center rounded-sm"
154+
className="flex size-6 items-center justify-center rounded-sm [input:placeholder-shown+&]:hidden"
155+
aria-label="Clear input"
155156
>
156157
<CloseIcon className="size-5 text-[--fg-80]" />
157158
</button>

0 commit comments

Comments
 (0)
Please sign in to comment.