1
0
Fork 0
mirror of synced 2024-07-16 19:56:10 +12:00

Color invalid options grey in grids

This commit is contained in:
Andrew Kingston 2024-05-23 15:59:04 +01:00
parent de78f1a242
commit 1156209399

View file

@ -13,6 +13,8 @@
export let api
export let contentLines = 1
const InvalidColor = "hsla(0, 0%, 70%, 0.3)"
let isOpen = false
let focusedOptionIdx = null
let anchor
@ -40,7 +42,7 @@
const getOptionColor = value => {
let idx = value ? options.indexOf(value) : null
if (idx == null || idx === -1) {
idx = 0
return InvalidColor
}
return OptionColours[idx % OptionColours.length]
}