mirror of
https://github.com/penpot/penpot.git
synced 2025-05-11 11:26:37 +02:00
🎉 Add many functions to assets panel and big refactor
This commit is contained in:
parent
3c7dda02c6
commit
b2fef7b7a8
9 changed files with 906 additions and 446 deletions
|
@ -71,6 +71,13 @@
|
|||
(update [_ state]
|
||||
(assoc-in state [:workspace-local :assets-files-open file-id box] open?))))
|
||||
|
||||
(defn set-assets-group-open
|
||||
[file-id box path open?]
|
||||
(ptk/reify ::set-assets-group-open
|
||||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(assoc-in state [:workspace-local :assets-files-open file-id :groups box path] open?))))
|
||||
|
||||
(defn default-color-name [color]
|
||||
(or (:color color)
|
||||
(case (get-in color [:gradient :type])
|
||||
|
|
|
@ -105,7 +105,9 @@
|
|||
{:class (dom/classnames :is-selected (and selected (= option-name selected)))
|
||||
:key option-name}
|
||||
(if-not sub-options
|
||||
[:a.context-menu-action {:on-click option-handler}
|
||||
[:a.context-menu-action {:on-click #(do (dom/stop-propagation %)
|
||||
(on-close)
|
||||
(option-handler %))}
|
||||
option-name]
|
||||
[:a.context-menu-action.submenu
|
||||
{:data-no-close true
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue