Skip to content

Commit 0833e37

Browse files
Add clear button in search bar
Fixes #156
1 parent 7d72428 commit 0833e37

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

src/pages/extensions.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,17 @@ export function Extensions({
157157
</label>
158158
</div>
159159
<div className="col-auto">
160+
<style>
161+
{`
162+
input[type=search]::-webkit-search-cancel-button {
163+
-webkit-appearance: searchfield-cancel-button;
164+
}
165+
`}
166+
</style>
160167
<Tippy content="Search extensions by author, name, or URL!">
161168
<input
162169
id="searchBar"
163-
type="text"
170+
type="search"
164171
className="form-control"
165172
placeholder="Search extensions by author, name, or URL!"
166173
defaultValue={search}

src/pages/tools.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,17 @@ export function Tools({ appProps, list }: ToolsProps): React.ReactNode {
138138
</label>
139139
</div>
140140
<div className="col-auto">
141+
<style>
142+
{`
143+
input[type=search]::-webkit-search-cancel-button {
144+
-webkit-appearance: searchfield-cancel-button;
145+
}
146+
`}
147+
</style>
141148
<Tippy content="Search tools by author, name, or URL!">
142149
<input
143150
id="searchBar"
144-
type="text"
151+
type="search"
145152
className="form-control"
146153
placeholder="Search tools by author, name, or URL!"
147154
defaultValue={search}

0 commit comments

Comments
 (0)