🐛 Pass color format to css formatter (#5890)

* 🐛 Pass color format to css formatter

* 📎 Use get method to retrieve format

* 📎 Add UI test to check background color is correctly copied to clipboard when changing the format
This commit is contained in:
Elena Torró 2025-02-19 11:23:52 +01:00 committed by GitHub
parent 44acd79081
commit f3040fc10d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 84 additions and 19 deletions

View file

@ -102,6 +102,8 @@
current-icon (:icon selected-option)
current-icon-ref (i/key->icon current-icon)]
[:div {:on-click open-dropdown
:role "combobox"
:aria-activedescendent current-value
:class (dm/str (stl/css-case :custom-select true
:disabled disabled
:icon (some? current-icon-ref))
@ -116,11 +118,13 @@
(for [[index item] (d/enumerate options)]
(if (= :separator item)
[:li {:class (dom/classnames (stl/css :separator) true)
:role "option"
:key (dm/str current-id "-" index)}]
(let [[value label icon] (as-key-value item)
icon-ref (i/key->icon icon)]
[:li
{:key (dm/str current-id "-" index)
:role "option"
:class (stl/css-case
:checked-element true
:disabled (:disabled item)