mirror of https://github.com/logseq/logseq
enhance(ux): popups collision padding for the property editor
parent
fafb9bcaf5
commit
308f7cf455
|
@ -594,7 +594,8 @@
|
||||||
(route-handler/redirect-to-page! (:block/name property))
|
(route-handler/redirect-to-page! (:block/name property))
|
||||||
(.preventDefault e)))
|
(.preventDefault e)))
|
||||||
:on-click (fn [^js e]
|
:on-click (fn [^js e]
|
||||||
(shui/popup-show! (.-target e)
|
(shui/popup-show!
|
||||||
|
(.-target e)
|
||||||
(fn [{:keys [id]}]
|
(fn [{:keys [id]}]
|
||||||
[:div.p-2
|
[:div.p-2
|
||||||
[:h2.text-lg.font-medium.mb-2.p-1 "Configure property"]
|
[:h2.text-lg.font-medium.mb-2.p-1 "Configure property"]
|
||||||
|
@ -604,6 +605,9 @@
|
||||||
:class-schema? class-schema?
|
:class-schema? class-schema?
|
||||||
:toggle-fn #(shui/popup-hide! id)})])
|
:toggle-fn #(shui/popup-hide! id)})])
|
||||||
{:content-props {:class "property-configure-popup-content"
|
{:content-props {:class "property-configure-popup-content"
|
||||||
|
:collisionPadding {:bottom 10 :top 10}
|
||||||
|
:side "bottom"
|
||||||
|
:avoidCollisions true
|
||||||
:align "start"}
|
:align "start"}
|
||||||
:as-menu? true}))}
|
:as-menu? true}))}
|
||||||
[:div {:style {:padding-left 6}} (:block/original-name property)]])]))
|
[:div {:style {:padding-left 6}} (:block/original-name property)]])]))
|
||||||
|
|
Loading…
Reference in New Issue