Skip to content

Commit 6d44e65

Browse files
committed
WIP(command-bar): command prompt
1 parent 1fbab7e commit 6d44e65

1 file changed

Lines changed: 14 additions & 13 deletions

File tree

app/components/CommandBar.vue

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,19 @@
99
>
1010
<label for="command-input" class="sr-only">command-input</label>
1111

12-
<input
13-
type="text"
14-
label="Enter command..."
15-
v-model="inputVal"
16-
id="command-input"
17-
ref="inputRef"
18-
class="w-xl h-12 px-4 text-fg outline-none bg-bg-subtle border border-border rounded-md"
19-
placeholder="Enter command..."
20-
@keydown="handleKeydown"
21-
/>
12+
<search class="relative w-xl h-12 flex items-center">
13+
<span class="absolute inset-is-4 text-fg-subtle font-mono pointer-events-none"> > </span>
14+
<input
15+
type="text"
16+
label="Enter command..."
17+
v-model="inputVal"
18+
id="command-input"
19+
ref="inputRef"
20+
class="w-full h-full px-4 pl-8 text-fg outline-none bg-bg-subtle border border-border rounded-md"
21+
placeholder="Enter command..."
22+
@keydown="handleKeydown"
23+
/>
24+
</search>
2225

2326
<div class="w-xl h-lg overflow-auto">
2427
<div
@@ -128,8 +131,8 @@ function triggerCommand(id: string) {
128131
selectedItem?.handler?.()
129132
triggeringId.value = id
130133
setTimeout(() => {
131-
triggeringId.value = ''
132134
close()
135+
triggeringId.value = ''
133136
}, 100)
134137
}
135138
@@ -181,7 +184,6 @@ defineExpose({
181184
@keyframes trigger-pulse {
182185
0% {
183186
transform: scale(1);
184-
background-color: var(--bg-subtle);
185187
}
186188
187189
50% {
@@ -191,7 +193,6 @@ defineExpose({
191193
192194
100% {
193195
transform: scale(1);
194-
background-color: var(--bg-subtle);
195196
}
196197
}
197198

0 commit comments

Comments
 (0)