mirror of
https://github.com/penpot/penpot.git
synced 2025-06-14 14:41:38 +02:00
✨ Small change to frame labels
This commit is contained in:
parent
4c36d83e38
commit
2a4573842d
6 changed files with 10 additions and 11 deletions
|
@ -74,7 +74,6 @@
|
||||||
(def workspace-saved-grids
|
(def workspace-saved-grids
|
||||||
(l/derived :saved-grids workspace-page-options))
|
(l/derived :saved-grids workspace-page-options))
|
||||||
|
|
||||||
|
|
||||||
(def workspace-objects
|
(def workspace-objects
|
||||||
(l/derived :objects workspace-data))
|
(l/derived :objects workspace-data))
|
||||||
|
|
||||||
|
|
|
@ -43,8 +43,8 @@
|
||||||
(mf/defc dropdown
|
(mf/defc dropdown
|
||||||
{::mf/wrap-props false}
|
{::mf/wrap-props false}
|
||||||
[props]
|
[props]
|
||||||
#_(assert (fn? (gobj/get props "on-close")) "missing `on-close` prop")
|
(assert (fn? (gobj/get props "on-close")) "missing `on-close` prop")
|
||||||
#_(assert (boolean? (gobj/get props "show")) "missing `show` prop")
|
(assert (boolean? (gobj/get props "show")) "missing `show` prop")
|
||||||
|
|
||||||
(when (gobj/get props "show")
|
(when (gobj/get props "show")
|
||||||
(mf/element dropdown' props)))
|
(mf/element dropdown' props)))
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
:type type}]
|
:type type}]
|
||||||
[:span.dropdown-button {:on-click open-dropdown} i/arrow-down]
|
[:span.dropdown-button {:on-click open-dropdown} i/arrow-down]
|
||||||
|
|
||||||
[:& dropdown {:show (:is-open? @state)
|
[:& dropdown {:show (get @state :is-open? false)
|
||||||
:on-close close-dropdown}
|
:on-close close-dropdown}
|
||||||
[:ul.custom-select-dropdown
|
[:ul.custom-select-dropdown
|
||||||
(for [[index item] (map-indexed vector options)]
|
(for [[index item] (map-indexed vector options)]
|
||||||
|
|
|
@ -71,7 +71,7 @@
|
||||||
childs (mapv #(get objects %) (:shapes shape))
|
childs (mapv #(get objects %) (:shapes shape))
|
||||||
ds-modifier (get-in shape [:modifiers :displacement])
|
ds-modifier (get-in shape [:modifiers :displacement])
|
||||||
|
|
||||||
label-pos (gpt/point x (- y 10))
|
label-pos (gpt/point x (- y (/ 10 zoom)))
|
||||||
|
|
||||||
on-double-click
|
on-double-click
|
||||||
(mf/use-callback
|
(mf/use-callback
|
||||||
|
|
|
@ -180,8 +180,8 @@
|
||||||
|
|
||||||
(when (#{:row :column} type)
|
(when (#{:row :column} type)
|
||||||
[:& input-row {:label (if (= :row type)
|
[:& input-row {:label (if (= :row type)
|
||||||
(t locale "workspace.options.grid.params.width")
|
(t locale "workspace.options.grid.params.height")
|
||||||
(t locale "workspace.options.grid.params.height"))
|
(t locale "workspace.options.grid.params.width"))
|
||||||
:class "pixels"
|
:class "pixels"
|
||||||
:value (or (:item-length params) "")
|
:value (or (:item-length params) "")
|
||||||
:on-change handle-change-item-length}])
|
:on-change handle-change-item-length}])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue