Skip to content

Commit 3542d0c

Browse files
committed
refactor(web): compose keybindings search with InputGroup
1 parent 2d0b342 commit 3542d0c

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

‎apps/web/src/components/settings/KeybindingsSettings.tsx‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ import { useSettingsScope } from "./SettingsScopeContext";
4242
import { Badge } from "../ui/badge";
4343
import { Button } from "../ui/button";
4444
import { Input } from "../ui/input";
45+
import { InputGroup, InputGroupAddon, InputGroupInput } from "../ui/input-group";
4546
import { Kbd, KbdGroup } from "../ui/kbd";
4647
import { Menu, MenuItem, MenuPopup, MenuTrigger } from "../ui/menu";
4748
import { Popover, PopoverContent, PopoverTrigger } from "../ui/popover";
@@ -117,9 +118,11 @@ function KeybindingsSearchInput({
117118
inputRef: RefObject<HTMLInputElement | null>;
118119
}) {
119120
return (
120-
<div className="relative w-full sm:w-64">
121-
<SearchIcon className="pointer-events-none absolute top-1/2 left-2.5 z-10 size-3.5 -translate-y-1/2 text-muted-foreground" />
122-
<Input
121+
<InputGroup className="w-full sm:w-64">
122+
<InputGroupAddon>
123+
<SearchIcon aria-hidden className="size-3.5" />
124+
</InputGroupAddon>
125+
<InputGroupInput
123126
ref={inputRef}
124127
type="search"
125128
value={query}
@@ -132,10 +135,9 @@ function KeybindingsSearchInput({
132135
}}
133136
placeholder="Search keybindings"
134137
aria-label="Search keybindings"
135-
className="[&_[data-slot=input]]:pl-8"
136138
size="sm"
137139
/>
138-
</div>
140+
</InputGroup>
139141
);
140142
}
141143

0 commit comments

Comments
 (0)