mirror of
https://github.com/penpot/penpot.git
synced 2025-06-01 22:11:39 +02:00
Merge branch 'staging' into develop
This commit is contained in:
commit
b586f2552c
7 changed files with 121 additions and 111 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
(ns app.main.ui.components.context-menu
|
||||
(:require
|
||||
[app.common.data :as d]
|
||||
[app.main.refs :as refs]
|
||||
[app.main.ui.components.dropdown :refer [dropdown']]
|
||||
[app.main.ui.icons :as i]
|
||||
|
@ -100,13 +101,13 @@
|
|||
[:span i/arrow-slide]
|
||||
parent-option]]
|
||||
[:li.separator]])
|
||||
(for [[option-name option-handler sub-options] (:options level)]
|
||||
(for [[index [option-name option-handler sub-options]] (d/enumerate (:options level))]
|
||||
(when option-name
|
||||
(if (= option-name :separator)
|
||||
[:li.separator]
|
||||
[:li.context-menu-item
|
||||
{:class (dom/classnames :is-selected (and selected (= option-name selected)))
|
||||
:key option-name}
|
||||
:key index}
|
||||
(if-not sub-options
|
||||
[:a.context-menu-action {:on-click #(do (dom/stop-propagation %)
|
||||
(on-close)
|
||||
|
|
|
@ -159,9 +159,7 @@
|
|||
(when (or up? down?)
|
||||
(set-delta event up? down?))
|
||||
(when enter?
|
||||
(let [new-value (parse-value)]
|
||||
(apply-value new-value)
|
||||
(dom/blur! input-node)))
|
||||
(dom/blur! input-node))
|
||||
(when esc?
|
||||
(update-input value-str)))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue