Added opacity-50 to suggested part of the search suggestion.

This commit is contained in:
Flo2410 2024-01-29 21:08:08 +00:00
parent 86ec610345
commit ed827837aa
No known key found for this signature in database
GPG Key ID: 8ECB00AC5216DC7F

View File

@ -276,7 +276,15 @@ export default function QuickLaunch({
</div> </div>
)} )}
<div className="flex flex-col md:flex-row text-left items-baseline mr-4 pointer-events-none"> <div className="flex flex-col md:flex-row text-left items-baseline mr-4 pointer-events-none">
<span className="mr-4">{r.name}</span> {r.type !== "searchSuggestion" && <span className="mr-4">{r.name}</span>}
{r.type === "searchSuggestion" && (
<>
<span className="whitespace-pre">{searchString}</span>
<span className="mr-4 whitespace-pre opacity-50">
{r.name.substring(searchString.length)}
</span>
</>
)}
{r.description && ( {r.description && (
<span className="text-xs text-theme-600 text-light"> <span className="text-xs text-theme-600 text-light">
{searchDescriptions && r.priority < 2 ? highlightText(r.description) : r.description} {searchDescriptions && r.priority < 2 ? highlightText(r.description) : r.description}