mirror of
https://github.com/penpot/penpot.git
synced 2025-04-15 08:21:40 -05:00
Merge pull request #5723 from penpot/juanfran-review-replace-combobox
🐛 Fix combobox bg color and dropdown only with options (#9753)
This commit is contained in:
commit
c5d5fa7561
2 changed files with 14 additions and 12 deletions
|
@ -9,6 +9,7 @@
|
|||
[app.common.data.macros :as dm]
|
||||
[app.main.style :as stl])
|
||||
(:require
|
||||
[app.common.data :as d]
|
||||
[app.main.ui.ds.controls.shared.options-dropdown :refer [options-dropdown*]]
|
||||
[app.main.ui.ds.foundations.assets.icon :refer [icon* icon-list] :as i]
|
||||
[app.util.array :as array]
|
||||
|
@ -242,17 +243,18 @@
|
|||
:on-change on-input-change
|
||||
:on-key-down on-key-down}]]
|
||||
|
||||
[:> :button {:type "button"
|
||||
:tab-index "-1"
|
||||
:aria-expanded open
|
||||
:aria-controls listbox-id
|
||||
:class (stl/css :button-toggle-list)
|
||||
:on-click on-click}
|
||||
[:> icon* {:icon-id i/arrow
|
||||
:class (stl/css :arrow)
|
||||
:size "s"
|
||||
:aria-hidden true
|
||||
:data-testid "combobox-open-button"}]]]
|
||||
(when (d/not-empty? options)
|
||||
[:> :button {:type "button"
|
||||
:tab-index "-1"
|
||||
:aria-expanded open
|
||||
:aria-controls listbox-id
|
||||
:class (stl/css :button-toggle-list)
|
||||
:on-click on-click}
|
||||
[:> icon* {:icon-id i/arrow
|
||||
:class (stl/css :arrow)
|
||||
:size "s"
|
||||
:aria-hidden true
|
||||
:data-testid "combobox-open-button"}]])]
|
||||
|
||||
(when (and open (seq dropdown-options))
|
||||
[:> options-dropdown* {:on-click on-option-click
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
.focused {
|
||||
--combobox-outline-color: var(--color-accent-primary);
|
||||
--combobox-bg-color: var(--color-background-secondary);
|
||||
--combobox-bg-color: var(--color-background-primary);
|
||||
}
|
||||
|
||||
.arrow {
|
||||
|
|
Loading…
Add table
Reference in a new issue