This commit is contained in:
@@ -93,7 +93,7 @@ const TagSearch: React.FC = () => {
|
||||
onFocus={() => setSuggestionsVsbl (true)}
|
||||
onBlur={() => setSuggestionsVsbl (false)}
|
||||
onKeyDown={handleKeyDown}
|
||||
className="w-full px-3 py-2 border rounded border-gray-600 bg-gray-800 text-white" />
|
||||
className="w-full px-3 py-2 border rounded dark:border-gray-600 dark:bg-gray-800 dark:text-white" />
|
||||
<TagSearchBox suggestions={suggestionsVsbl && suggestions.length ? suggestions : [] as Tag[]}
|
||||
activeIndex={activeIndex}
|
||||
onSelect={handleTagSelect} />
|
||||
|
||||
@@ -9,16 +9,16 @@ type Props = { suggestions: Tag[]
|
||||
|
||||
export default ({ suggestions, activeIndex, onSelect }: Props) => {
|
||||
if (!(suggestions.length))
|
||||
return null
|
||||
return
|
||||
|
||||
return (
|
||||
<ul className="absolute left-0 right-0 z-50 w-full bg-gray-800 border border-gray-600 rounded shadow">
|
||||
<ul className="absolute left-0 right-0 z-50 w-full
|
||||
bg-gray-100 dark:bg-gray-800 border dark:border-gray-600
|
||||
rounded shadow">
|
||||
{suggestions.map ((tag, i) => (
|
||||
<li key={tag.id}
|
||||
className={cn ('px-3 py-2 cursor-pointer',
|
||||
(i === activeIndex
|
||||
? 'bg-blue-600 text-white'
|
||||
: 'hover:bg-gray-700'))}
|
||||
className={cn ('px-3 py-2 cursor-pointer hover:bg-gray-300 dark:hover:bg-gray-700',
|
||||
i === activeIndex && 'bg-gray-300 dark:bg-gray-700')}
|
||||
onMouseDown={() => onSelect (tag)}
|
||||
>
|
||||
{tag.name}
|
||||
|
||||
Reference in New Issue
Block a user