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
|
### :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 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)
|
- 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"))
|
(tr "workspace.options.fill"))
|
||||||
|
|
||||||
;; Excluding nil values
|
;; Excluding nil values
|
||||||
values (d/without-nils values)
|
values (d/without-nils values)
|
||||||
fills (:fills values)
|
fills (:fills values)
|
||||||
has-fills? (or (= :multiple fills) (some? (seq fills)))
|
has-fills? (or (= :multiple fills) (some? (seq fills)))
|
||||||
|
|
||||||
|
|
||||||
state* (mf/use-state has-fills?)
|
state* (mf/use-state true)
|
||||||
open? (deref state*)
|
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)
|
hide-fill-on-export? (:hide-fill-on-export values false)
|
||||||
|
|
||||||
checkbox-ref (mf/use-ref)
|
checkbox-ref (mf/use-ref)
|
||||||
|
|
||||||
on-add
|
on-add
|
||||||
(mf/use-fn
|
(mf/use-fn
|
||||||
|
@ -149,7 +149,7 @@
|
||||||
:data-testid "add-fill"
|
:data-testid "add-fill"
|
||||||
:on-click on-add} i/add])]]
|
:on-click on-add} i/add])]]
|
||||||
|
|
||||||
(when open?
|
(when (and open? has-fills?)
|
||||||
[:div {:class (stl/css :element-content)}
|
[:div {:class (stl/css :element-content)}
|
||||||
(cond
|
(cond
|
||||||
(= :multiple fills)
|
(= :multiple fills)
|
||||||
|
|
Loading…
Add table
Reference in a new issue