mirror of
https://github.com/penpot/penpot.git
synced 2025-03-11 23:31:21 -05:00
🐛 Fix fill collapsed options
This commit is contained in:
parent
6b3bfc85b3
commit
d527bbd8b5
2 changed files with 11 additions and 10 deletions
|
@ -12,6 +12,7 @@
|
|||
|
||||
### :bug: Bugs fixed
|
||||
|
||||
- Fix fill collapsed options [Taiga #8351](https://tree.taiga.io/project/penpot/issue/8351)
|
||||
- Fix scroll on color picker modal [Taiga #8353](https://tree.taiga.io/project/penpot/issue/8353)
|
||||
- Fix components are not dragged from the group to the assets tab [Taiga #8273](https://tree.taiga.io/project/penpot/issue/8273)
|
||||
|
||||
|
|
|
@ -49,23 +49,23 @@
|
|||
(tr "workspace.options.fill"))
|
||||
|
||||
;; Excluding nil values
|
||||
values (d/without-nils values)
|
||||
fills (:fills values)
|
||||
has-fills? (or (= :multiple fills) (some? (seq fills)))
|
||||
values (d/without-nils values)
|
||||
fills (:fills values)
|
||||
has-fills? (or (= :multiple fills) (some? (seq fills)))
|
||||
|
||||
|
||||
state* (mf/use-state has-fills?)
|
||||
open? (deref state*)
|
||||
state* (mf/use-state true)
|
||||
open? (deref state*)
|
||||
|
||||
toggle-content (mf/use-fn #(swap! state* not))
|
||||
toggle-content (mf/use-fn #(swap! state* not))
|
||||
|
||||
open-content (mf/use-fn #(reset! state* true))
|
||||
open-content (mf/use-fn #(reset! state* true))
|
||||
|
||||
close-content (mf/use-fn #(reset! state* false))
|
||||
close-content (mf/use-fn #(reset! state* false))
|
||||
|
||||
hide-fill-on-export? (:hide-fill-on-export values false)
|
||||
|
||||
checkbox-ref (mf/use-ref)
|
||||
checkbox-ref (mf/use-ref)
|
||||
|
||||
on-add
|
||||
(mf/use-fn
|
||||
|
@ -149,7 +149,7 @@
|
|||
:data-testid "add-fill"
|
||||
:on-click on-add} i/add])]]
|
||||
|
||||
(when open?
|
||||
(when (and open? has-fills?)
|
||||
[:div {:class (stl/css :element-content)}
|
||||
(cond
|
||||
(= :multiple fills)
|
||||
|
|
Loading…
Add table
Reference in a new issue