🐛 Fix link in penpot logo spanning way below it (in viewer)

This commit is contained in:
Belén Albeza 2024-06-04 11:25:09 +02:00
parent 83090826f7
commit 67ababf1ed
7 changed files with 266 additions and 9 deletions

View file

@ -256,6 +256,10 @@
[:span {:class (stl/css :frame-name)} frame-name]
[:span {:class (stl/css :icon)} i/arrow]]]]))
(def ^:private penpot-logo-icon
(i/icon-xref :penpot-logo-icon (stl/css :logo-icon)))
(mf/defc header
[{:keys [project file page frame zoom section permissions index interactions-mode shown-thumbnails]}]
(let [go-to-dashboard
@ -303,10 +307,10 @@
;; If the user doesn't have permission we disable the link
[:a {:class (stl/css :home-link)
:on-click go-to-dashboard
:data-testid "penpot-logo-link"
:style {:cursor (when-not (:in-team permissions) "auto")
:pointer-events (when-not (:in-team permissions) "none")}}
[:span {:class (stl/css :logo-icon)}
i/logo-icon]]
penpot-logo-icon]
[:& header-sitemap {:project project
:file file

View file

@ -34,16 +34,14 @@
.home-link {
padding: 0;
display: grid;
place-content: center;
}
.logo-icon {
@include flexCenter;
width: $s-32;
height: $s-32;
svg {
width: $s-28;
fill: var(--icon-foreground-hover);
}
width: $s-28;
height: $s-28;
fill: var(--icon-foreground-hover);
}
.sitemap-zone {