I'm working on adding theme support for selection colors in listbox.
Given that there will be even more logic to get the correct background and font colors, I have "prefactored" the logic to be more general. All 5 different selection states maps really well to the prop names on sprout, the layout, and the theme (except for palette.selected.main...)
To me this is as readable as before, but more compact and easier to change the logic later.
Requirements checklist
[x] Api specification
[x] Ran yarn spec
[x] No changes OR API changes has been formally approved
[x] Unit/Component test coverage
[x] Correct PR title for the changes (fix, chore, feat)
When build and tests have passed:
[x] Add code reviewers, for example @qlik-oss/nebula-core
Motivation
I'm working on adding theme support for selection colors in listbox. Given that there will be even more logic to get the correct background and font colors, I have "prefactored" the logic to be more general. All 5 different selection states maps really well to the prop names on sprout, the layout, and the theme (except for palette.selected.main...)
To me this is as readable as before, but more compact and easier to change the logic later.
Requirements checklist
yarn spec
When build and tests have passed: