mirror of
https://github.com/penpot/penpot.git
synced 2026-07-31 18:36:18 +00:00
🐛 Fix collapsed fills section on text shapes (#10972)
This commit is contained in:
parent
9b0be1c750
commit
7fa6631005
@ -84,8 +84,10 @@
|
||||
empty-fills? (and (not multiple?)
|
||||
(= 0 (count fills)))
|
||||
|
||||
open* (mf/use-state has-fills?)
|
||||
open? (deref open*)
|
||||
;; Derive the open state from `has-fills?` on every render so it stays
|
||||
;; in sync even when the fills arrive after mount (editor v3)
|
||||
open* (mf/use-state true)
|
||||
open? (and has-fills? (deref open*))
|
||||
|
||||
toggle-content (mf/use-fn #(swap! open* not))
|
||||
open-content (mf/use-fn #(reset! open* true))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user