chore: fix plaintext icon color on hover in selection dropdown
This commit is contained in:
@@ -84,7 +84,7 @@ const Dropdown = ({
|
|||||||
>
|
>
|
||||||
{items.map((item) => (
|
{items.map((item) => (
|
||||||
<SelectItem
|
<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}
|
key={item.value}
|
||||||
value={item.value}
|
value={item.value}
|
||||||
disabled={item.disabled}
|
disabled={item.disabled}
|
||||||
|
|||||||
@@ -3,10 +3,12 @@ import {
|
|||||||
FindNativeFeature,
|
FindNativeFeature,
|
||||||
GetIframeAndNativeEditors,
|
GetIframeAndNativeEditors,
|
||||||
NativeFeatureIdentifier,
|
NativeFeatureIdentifier,
|
||||||
|
NoteType,
|
||||||
} from '@standardnotes/features'
|
} from '@standardnotes/features'
|
||||||
import { getIconAndTintForNoteType } from './Items/Icons/getIconAndTintForNoteType'
|
import { getIconAndTintForNoteType } from './Items/Icons/getIconAndTintForNoteType'
|
||||||
import { DropdownItem } from '@/Components/Dropdown/DropdownItem'
|
import { DropdownItem } from '@/Components/Dropdown/DropdownItem'
|
||||||
import { WebApplicationInterface } from '@standardnotes/ui-services'
|
import { WebApplicationInterface } from '@standardnotes/ui-services'
|
||||||
|
import { classNames } from '@standardnotes/snjs'
|
||||||
|
|
||||||
export type EditorOption = DropdownItem & {
|
export type EditorOption = DropdownItem & {
|
||||||
value: string
|
value: string
|
||||||
@@ -25,7 +27,14 @@ export function getDropdownItemsForAllEditors(application: WebApplicationInterfa
|
|||||||
value: editor.identifier,
|
value: editor.identifier,
|
||||||
id: NativeFeatureIdentifier.create(editor.identifier).getValue(),
|
id: NativeFeatureIdentifier.create(editor.identifier).getValue(),
|
||||||
...(iconType ? { icon: iconType } : null),
|
...(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