Skip to content

Commit 5d4addf

Browse files
Improve search palette styling with better section rendering and padding (#2195)
* Improve search palette styling with better section rendering and padding Co-Authored-By: [email protected] <[email protected]> * Update search palette padding and add hover/selection highlighting Co-Authored-By: [email protected] <[email protected]> * Trigger CI re-run Co-Authored-By: [email protected] <[email protected]> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: [email protected] <[email protected]>
1 parent afdf9bc commit 5d4addf

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

apps/web/src/components/search.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ function SearchCommandPalette({
334334
onValueChange={setQuery}
335335
/>
336336
<div className="border-t border-neutral-100" />
337-
<CommandList className="max-h-[400px]">
337+
<CommandList className="max-h-[400px] px-1">
338338
{isLoading && (
339339
<div className="py-6 text-center text-sm text-neutral-500">
340340
Searching...
@@ -344,13 +344,16 @@ function SearchCommandPalette({
344344
<CommandEmpty>No results found.</CommandEmpty>
345345
)}
346346
{!isLoading && results.length > 0 && (
347-
<CommandGroup heading="Documentation">
347+
<CommandGroup
348+
heading="Documentation"
349+
className="[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-2 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:text-neutral-500 [&_[cmdk-group-heading]]:uppercase [&_[cmdk-group-heading]]:tracking-wider"
350+
>
348351
{results.map((result, index) => (
349352
<CommandItem
350353
key={`${result.url}-${index}`}
351354
value={result.url}
352355
onSelect={() => handleSelect(result.url)}
353-
className="flex items-start gap-3 py-3 cursor-pointer"
356+
className="flex items-start gap-3 px-2 py-3 cursor-pointer rounded-md hover:bg-neutral-100 data-[selected=true]:bg-neutral-100"
354357
>
355358
<FileText
356359
size={16}

0 commit comments

Comments
 (0)