0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-09 16:30:37 -05:00

Some visual fixes

This commit is contained in:
Andrés Moya 2021-09-29 12:37:38 +02:00
parent 8d634a79c8
commit 0b8b766b62
3 changed files with 22 additions and 5 deletions

View file

@ -1,6 +1,7 @@
.zoom-widget {
cursor: pointer;
display: flex;
position: relative;
span {
color: $color-gray-10;
@ -16,8 +17,10 @@
.dropdown {
position: absolute;
z-index: 12;
right: 0;
top: 25px;
width: 210px;
z-index: 12;
background-color: $color-white;
border-radius: $br-small;

View file

@ -219,6 +219,12 @@
(update [_ state]
(update-in state [:viewer-local :show-thumbnails] not))))
(def close-thumbnails-panel
(ptk/reify ::close-thumbnails-panel
ptk/UpdateEvent
(update [_ state]
(assoc-in state [:viewer-local :show-thumbnails] false))))
(def select-prev-frame
(ptk/reify ::select-prev-frame
ptk/WatchEvent

View file

@ -84,15 +84,23 @@
show-dropdown? (mf/use-state false)
open-dropdown
(fn []
(reset! show-dropdown? true)
(st/emit! dv/close-thumbnails-panel))
close-dropdown
(fn []
(reset! show-dropdown? false))
navigate-to
(fn [page-id]
(st/emit! (dv/go-to-page page-id))
(reset! show-dropdown? false))
]
(reset! show-dropdown? false))]
[:div.sitemap-zone {:alt (tr "viewer.header.sitemap")}
[:div.breadcrumb
{:on-click #(swap! show-dropdown? not)}
{:on-click open-dropdown}
[:span.project-name project-name]
[:span "/"]
[:span.file-name file-name]
@ -101,7 +109,7 @@
[:span.icon i/arrow-down]
[:& dropdown {:show @show-dropdown?
:on-close #(swap! show-dropdown? not)}
:on-close close-dropdown}
[:ul.dropdown
(for [id (get-in file [:data :pages])]
[:li {:id (str id)