AutosuggestInput dark styles

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2022-04-14 15:36:07 +02:00
parent 580633c915
commit bd1e6d364a

View file

@ -206,8 +206,8 @@ export default class AutosuggestInput extends ImmutablePureComponent {
key={key} key={key}
data-index={i} data-index={i}
className={classNames({ className={classNames({
'px-4 py-2.5 text-sm text-gray-700 cursor-pointer hover:bg-gray-100 group': true, 'px-4 py-2.5 text-sm text-gray-700 dark:text-gray-400 cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-700 group': true,
'bg-gray-100 hover:bg-gray-100': i === selectedSuggestion, 'bg-gray-100 dark:bg-slate-700 hover:bg-gray-100 dark:hover:bg-gray-700': i === selectedSuggestion,
})} })}
onMouseDown={this.onSuggestionClick} onMouseDown={this.onSuggestionClick}
> >
@ -238,7 +238,7 @@ export default class AutosuggestInput extends ImmutablePureComponent {
return menu.map((item, i) => ( return menu.map((item, i) => (
<a <a
className={classNames('flex items-center space-x-2 px-4 py-2.5 text-sm text-gray-700 cursor-pointer hover:bg-gray-100', { selected: suggestions.size - selectedSuggestion === i })} className={classNames('flex items-center space-x-2 px-4 py-2.5 text-sm text-gray-700 dark:text-gray-400 cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-700', { selected: suggestions.size - selectedSuggestion === i })}
href='#' href='#'
role='button' role='button'
tabIndex='0' tabIndex='0'
@ -293,7 +293,7 @@ export default class AutosuggestInput extends ImmutablePureComponent {
/> />
<div className={classNames({ <div className={classNames({
'absolute top-full w-full z-50 shadow bg-white rounded-lg py-1': true, 'absolute top-full w-full z-50 shadow bg-white dark:bg-slate-800 rounded-lg py-1': true,
hidden: !visible, hidden: !visible,
block: visible, block: visible,
'autosuggest-textarea__suggestions--visible': visible, 'autosuggest-textarea__suggestions--visible': visible,