0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-02 04:19:08 -05:00

Add help button to flex options

This commit is contained in:
alonso.torres 2023-12-04 15:17:25 +01:00 committed by Andrey Antukh
parent 23b5eeaf68
commit d3b71889ae
3 changed files with 19 additions and 2 deletions

View file

@ -102,6 +102,7 @@
(def terms-of-service-uri (obj/get global "penpotTermsOfServiceURI" "https://penpot.app/terms"))
(def privacy-policy-uri (obj/get global "penpotPrivacyPolicyURI" "https://penpot.app/privacy"))
(def flex-help-uri (obj/get global "penpotGridHelpURI" "https://help.penpot.app/user-guide/flexible-layouts/"))
(def grid-help-uri (obj/get global "penpotGridHelpURI" "https://help.penpot.app/user-guide/flexible-layouts/"))
(defn- normalize-uri

View file

@ -1356,6 +1356,11 @@
(fn []
(reset! show-layout-dropdown* false)))
handle-open-flex-help
(mf/use-callback
(fn []
(st/emit! (dom/open-new-window cf/flex-help-uri))))
handle-open-grid-help
(mf/use-callback
(fn []
@ -1413,10 +1418,13 @@
[:& wrap-row {:wrap-type wrap-type
:on-click toggle-wrap-refactor}]]
[:div {:class (stl/css :second-row)}
[:div {:class (stl/css :second-row :help-button-wrapper)}
[:& justify-content-row {:is-col? is-col?
:justify-content justify-content
:on-change set-justify-content-refactor}]]
:on-change set-justify-content-refactor}]
[:button {:on-click handle-open-flex-help
:class (stl/css :help-button)} i/help-refactor]]
(when (= :wrap wrap-type)
[:div {:class (stl/css :third-row)}
[:& align-content-row {:is-col? is-col?

View file

@ -65,6 +65,14 @@
.forth-row {
@include flexColumn;
}
.help-button-wrapper {
position: relative;
.help-button {
position: absolute;
top: 0;
right: 0;
}
}
}
}