mirror of
https://github.com/penpot/penpot.git
synced 2025-02-10 00:58:26 -05:00
Merge pull request #3722 from penpot/palba-fix-component-sidebar-style
🐛 Fix component sidebar title style
This commit is contained in:
commit
0c84db9350
2 changed files with 41 additions and 24 deletions
|
@ -73,18 +73,6 @@
|
|||
width: 100%;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
svg {
|
||||
height: 8px;
|
||||
width: 8px;
|
||||
fill: $color-gray-20;
|
||||
margin-right: 1rem;
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
&.back {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2587,6 +2575,23 @@
|
|||
}
|
||||
}
|
||||
|
||||
.component-block-title {
|
||||
border: none;
|
||||
background: none;
|
||||
|
||||
svg {
|
||||
height: 8px;
|
||||
width: 8px;
|
||||
fill: $color-gray-20;
|
||||
margin-right: 1rem;
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
&.back {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.component-swap {
|
||||
.search-block {
|
||||
margin: 0.7rem 0.5rem 0.2rem 0.2rem;
|
||||
|
|
|
@ -387,9 +387,13 @@
|
|||
(swap! state* update :menu-open not)))
|
||||
|
||||
on-menu-close
|
||||
(mf/use-callback
|
||||
(mf/use-fn
|
||||
#(swap! state* assoc :menu-open false))
|
||||
|
||||
on-component-back
|
||||
(mf/use-fn
|
||||
#(st/emit! :interrupt))
|
||||
|
||||
menu-entries (cmm/generate-components-menu-entries shapes components-v2)
|
||||
show-menu? (seq menu-entries)]
|
||||
|
||||
|
@ -427,17 +431,25 @@
|
|||
[:& component-annotation {:id id :shape shape :component component}])])]
|
||||
|
||||
[:div.element-set
|
||||
[:div.element-set-title {:class (stl/css-case :back swap-opened?)
|
||||
:on-click #(when swap-opened? (st/emit! :interrupt))}
|
||||
[:div
|
||||
(when swap-opened?
|
||||
[:span
|
||||
i/arrow-slide])
|
||||
[:span (tr "workspace.options.component")]]
|
||||
(when-not multi
|
||||
[:span (if main-instance?
|
||||
(tr "workspace.options.component.main")
|
||||
(tr "workspace.options.component.copy"))])]
|
||||
(if swap-opened?
|
||||
[:button.element-set-title.component-block-title {:class (stl/css-case :back swap-opened?)
|
||||
:on-click on-component-back}
|
||||
[:div
|
||||
[:span i/arrow-slide]
|
||||
[:span (tr "workspace.options.component")]]
|
||||
|
||||
(when-not multi
|
||||
[:span (if main-instance?
|
||||
(tr "workspace.options.component.main")
|
||||
(tr "workspace.options.component.copy"))])]
|
||||
[:div.element-set-title
|
||||
[:span (tr "workspace.options.component")]
|
||||
(when-not multi
|
||||
[:span (if main-instance?
|
||||
(tr "workspace.options.component.main")
|
||||
(tr "workspace.options.component.copy"))])])
|
||||
|
||||
|
||||
[:div.element-set-content
|
||||
[:div.row-flex.component-row
|
||||
{:class (stl/css-case :copy can-swap?)
|
||||
|
|
Loading…
Add table
Reference in a new issue