mirror of
https://github.com/penpot/penpot.git
synced 2025-06-06 09:01:37 +02:00
Merge pull request #3997 from penpot/ladybenko-6490-fix-component-hover-ui
🐛 Fix assets UI
This commit is contained in:
commit
65f7c9cbbf
6 changed files with 57 additions and 76 deletions
|
@ -23,6 +23,9 @@
|
|||
editing? (unchecked-get props "editing")
|
||||
dbl-click? (unchecked-get props "disable-dbl-click")
|
||||
class (unchecked-get props "class")
|
||||
tooltip (unchecked-get props "tooltip")
|
||||
display-value (unchecked-get props "display-value")
|
||||
|
||||
|
||||
final-class (dm/str class " " (stl/css :editable-label))
|
||||
input-ref (mf/use-ref nil)
|
||||
|
@ -82,15 +85,21 @@
|
|||
(when (and editing? (not internal-editing?))
|
||||
(start-edition)))
|
||||
|
||||
[:div {:class final-class}
|
||||
[:input
|
||||
{:class (stl/css :editable-label-input)
|
||||
:ref input-ref
|
||||
:default-value value
|
||||
:on-key-up on-key-up
|
||||
:on-double-click on-dbl-click
|
||||
:on-blur cancel-edition}]
|
||||
(if ^boolean internal-editing?
|
||||
[:div {:class final-class}
|
||||
[:input
|
||||
{:class (stl/css :editable-label-input)
|
||||
:ref input-ref
|
||||
:default-value value
|
||||
:on-key-up on-key-up
|
||||
:on-double-click on-dbl-click
|
||||
:on-blur cancel-edition}]
|
||||
|
||||
[:span {:class (stl/css :editable-label-close)
|
||||
:on-click cancel-edition}
|
||||
i/delete-text-refactor]]))
|
||||
[:span {:class (stl/css :editable-label-close)
|
||||
:on-click cancel-edition}
|
||||
i/delete-text-refactor]]
|
||||
|
||||
[:span {:class final-class
|
||||
:title tooltip
|
||||
:on-double-click on-dbl-click}
|
||||
display-value])))
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
encode-fn (unchecked-get context "encode-fn")
|
||||
checked? (= selected value)]
|
||||
|
||||
[:label {:for id
|
||||
[:label {:html-for id
|
||||
:title title
|
||||
:key unique-key
|
||||
:class (stl/css-case
|
||||
|
@ -104,6 +104,3 @@
|
|||
[:div {:class (dm/str class " " (stl/css :radio-btn-wrapper))
|
||||
:style {:width width}}
|
||||
children]]))
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue