mirror of
https://github.com/penpot/penpot.git
synced 2025-07-31 21:38:30 +02:00
🎉 Group components and graphics in assets sidebar
This commit is contained in:
parent
eff333cbaf
commit
3613e6f3d3
14 changed files with 525 additions and 107 deletions
|
@ -14,8 +14,9 @@
|
|||
[rumext.alpha :as mf]))
|
||||
|
||||
(mf/defc editable-label
|
||||
[{:keys [value on-change on-cancel editing? disable-dbl-click? class-name]}]
|
||||
(let [input (mf/use-ref nil)
|
||||
[{:keys [value on-change on-cancel editing? disable-dbl-click? class-name] :as props}]
|
||||
(let [display-value (get props :display-value value)
|
||||
input (mf/use-ref nil)
|
||||
state (mf/use-state (:editing false))
|
||||
is-editing (:editing @state)
|
||||
start-editing (fn []
|
||||
|
@ -53,4 +54,4 @@
|
|||
:on-blur cancel-editing}]
|
||||
[:span.editable-label-close {:on-click cancel-editing} i/close]]
|
||||
[:span.editable-label {:class class-name
|
||||
:on-double-click on-dbl-click} value])))
|
||||
:on-double-click on-dbl-click} display-value])))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue