0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-15 17:21:17 -05:00

Allow create nested component directly

This commit is contained in:
Andrés Moya 2020-10-30 09:42:06 +01:00
parent 8165fec50e
commit 486f2b6ba5

View file

@ -139,14 +139,16 @@
[:& menu-entry {:title (t locale "workspace.shape.menu.lock")
:on-click do-lock-shape}])
(when (nil? (:shape-ref shape))
(when (or (nil? (:shape-ref shape))
(> (count selected) 1))
[:*
[:& menu-separator]
[:& menu-entry {:title (t locale "workspace.shape.menu.create-component")
:shortcut "Ctrl + K"
:on-click do-add-component}]])
(when (:component-id shape)
(when (and (:component-id shape)
(= (count selected) 1))
[:*
[:& menu-separator]
[:& menu-entry {:title (t locale "workspace.shape.menu.detach-instance")