65 | {
66 | !this.state.hideSuggestions && this.props.showSuggestions && this.props.query.length > 2 &&
67 |
68 | {this.state.suggestions.map((suggestion, index) => {
69 | return (
70 |
this.onSuggestionClick(suggestion)} key={index}
71 | className={'text-[#C9C9C9] font-poppins font-medium text-lg mt-2 hover:bg-[#37383a] p-1 py-2'
72 | + (this.state.activeSuggestion === index ? ' bg-[#37383a] border-l-[#8E59D1] rounded-l-sm border-l-[3px]' :
73 | '')}>
74 | {this.props.query}
75 | {suggestion}
76 |
77 |
78 |
79 | )
80 | })}
81 | {this.state.suggestions.length > 1 &&
82 |
Use arrows ↑ ↓ to navigate
}
83 |