0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-07 23:08:24 -05:00

Open library by cliking in the whole selector

This commit is contained in:
Andrés Moya 2020-11-27 07:49:39 +01:00 committed by Andrey Antukh
parent 1f92237b19
commit b67b3243bb
2 changed files with 11 additions and 5 deletions

View file

@ -108,13 +108,16 @@
.collapse-library {
margin-right: $small;
cursor: pointer;
&.open svg {
transform: rotate(90deg);
}
}
.library-bar {
cursor: pointer;
}
.asset-group {
background-color: $color-gray-60;
border-top: 1px solid $color-gray-50;

View file

@ -557,10 +557,10 @@
components (apply-filters (mf/deref components-ref) filters)]
[:div.tool-window
[:div.tool-window-bar
[:div.tool-window-bar.library-bar
{:on-click toggle-open}
[:div.collapse-library
{:class (dom/classnames :open @open?)
:on-click toggle-open}
{:class (dom/classnames :open @open?)}
i/arrow-slide]
(if local?
@ -571,7 +571,10 @@
[:*
[:span (:name file)]
[:span.tool-link.tooltip.tooltip-left {:alt "Open library file"}
[:a {:href (str "#" url) :target "_blank"} i/chain]]])]
[:a {:href (str "#" url)
:target "_blank"
:on-click dom/stop-propagation}
i/chain]]])]
(when @open?
(let [show-components? (and (or (= (:box filters) :all)