mirror of
https://github.com/penpot/penpot.git
synced 2025-06-09 20:51:39 +02:00
🐛 Fix component sidebar title style
This commit is contained in:
parent
2fe820304e
commit
fd75974c2c
2 changed files with 41 additions and 24 deletions
|
@ -73,18 +73,6 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
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 {
|
.component-swap {
|
||||||
.search-block {
|
.search-block {
|
||||||
margin: 0.7rem 0.5rem 0.2rem 0.2rem;
|
margin: 0.7rem 0.5rem 0.2rem 0.2rem;
|
||||||
|
|
|
@ -387,9 +387,13 @@
|
||||||
(swap! state* update :menu-open not)))
|
(swap! state* update :menu-open not)))
|
||||||
|
|
||||||
on-menu-close
|
on-menu-close
|
||||||
(mf/use-callback
|
(mf/use-fn
|
||||||
#(swap! state* assoc :menu-open false))
|
#(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)
|
menu-entries (cmm/generate-components-menu-entries shapes components-v2)
|
||||||
show-menu? (seq menu-entries)]
|
show-menu? (seq menu-entries)]
|
||||||
|
|
||||||
|
@ -427,17 +431,25 @@
|
||||||
[:& component-annotation {:id id :shape shape :component component}])])]
|
[:& component-annotation {:id id :shape shape :component component}])])]
|
||||||
|
|
||||||
[:div.element-set
|
[:div.element-set
|
||||||
[:div.element-set-title {:class (stl/css-case :back swap-opened?)
|
(if swap-opened?
|
||||||
:on-click #(when swap-opened? (st/emit! :interrupt))}
|
[:button.element-set-title.component-block-title {:class (stl/css-case :back swap-opened?)
|
||||||
|
:on-click on-component-back}
|
||||||
[:div
|
[:div
|
||||||
(when swap-opened?
|
[:span i/arrow-slide]
|
||||||
[:span
|
|
||||||
i/arrow-slide])
|
|
||||||
[:span (tr "workspace.options.component")]]
|
[:span (tr "workspace.options.component")]]
|
||||||
|
|
||||||
(when-not multi
|
(when-not multi
|
||||||
[:span (if main-instance?
|
[:span (if main-instance?
|
||||||
(tr "workspace.options.component.main")
|
(tr "workspace.options.component.main")
|
||||||
(tr "workspace.options.component.copy"))])]
|
(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.element-set-content
|
||||||
[:div.row-flex.component-row
|
[:div.row-flex.component-row
|
||||||
{:class (stl/css-case :copy can-swap?)
|
{:class (stl/css-case :copy can-swap?)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue