Skip to content

Commit

Permalink
Merge pull request #137 from PranavRayudu/main
Browse files Browse the repository at this point in the history
Added icon support to KBar
  • Loading branch information
timlrx authored Sep 20, 2023
2 parents 99350ca + e9bcff8 commit e16568b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/witty-weeks-tap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"pliny": patch
---

Added icon support to KBar
19 changes: 12 additions & 7 deletions packages/pliny/src/search/KBarModal.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// noinspection TypeScriptMissingConfigOption

import {
KBarPortal,
KBarSearch,
Expand Down Expand Up @@ -75,13 +77,16 @@ const RenderResults = () => {
: 'text-gray-700 dark:text-gray-100 bg-transparent'
}`}
>
<div className="block">
{item.subtitle && (
<div className={`${active ? 'text-gray-200' : 'text-gray-400'} text-xs`}>
{item.subtitle}
</div>
)}
<div>{item.name}</div>
<div className={'flex space-x-2'}>
{item.icon && <div className={"self-center"}>{item.icon}</div> }
<div className="block">
{item.subtitle && (
<div className={`${active ? 'text-gray-200' : 'text-gray-400'} text-xs`}>
{item.subtitle}
</div>
)}
<div>{item.name}</div>
</div>
</div>
{item.shortcut?.length ? (
<div aria-hidden className="flex flex-row items-center justify-center gap-x-2">
Expand Down

0 comments on commit e16568b

Please sign in to comment.