chore: fix plaintext icon color on hover in selection dropdown
This commit is contained in:
@@ -84,7 +84,7 @@ const Dropdown = ({
|
||||
>
|
||||
{items.map((item) => (
|
||||
<SelectItem
|
||||
className="flex cursor-pointer items-center bg-transparent px-3 py-1.5 text-sm text-text hover:bg-contrast hover:text-foreground [&[data-active-item]]:bg-info [&[data-active-item]]:text-info-contrast"
|
||||
className="group flex cursor-pointer items-center bg-transparent px-3 py-1.5 text-sm text-text hover:bg-contrast hover:text-foreground [&[data-active-item]]:bg-info [&[data-active-item]]:text-info-contrast"
|
||||
key={item.value}
|
||||
value={item.value}
|
||||
disabled={item.disabled}
|
||||
|
||||
@@ -3,10 +3,12 @@ import {
|
||||
FindNativeFeature,
|
||||
GetIframeAndNativeEditors,
|
||||
NativeFeatureIdentifier,
|
||||
NoteType,
|
||||
} from '@standardnotes/features'
|
||||
import { getIconAndTintForNoteType } from './Items/Icons/getIconAndTintForNoteType'
|
||||
import { DropdownItem } from '@/Components/Dropdown/DropdownItem'
|
||||
import { WebApplicationInterface } from '@standardnotes/ui-services'
|
||||
import { classNames } from '@standardnotes/snjs'
|
||||
|
||||
export type EditorOption = DropdownItem & {
|
||||
value: string
|
||||
@@ -25,7 +27,14 @@ export function getDropdownItemsForAllEditors(application: WebApplicationInterfa
|
||||
value: editor.identifier,
|
||||
id: NativeFeatureIdentifier.create(editor.identifier).getValue(),
|
||||
...(iconType ? { icon: iconType } : null),
|
||||
...(tint ? { iconClassName: `text-accessory-tint-${tint}` } : null),
|
||||
...(tint
|
||||
? {
|
||||
iconClassName: classNames(
|
||||
`text-accessory-tint-${tint}`,
|
||||
editor.note_type === NoteType.Plain && 'group-hover:text-info-contrast',
|
||||
),
|
||||
}
|
||||
: null),
|
||||
}
|
||||
}),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user