mirror of
https://github.com/penpot/penpot.git
synced 2025-05-31 00:46:11 +02:00
🐛 Fixed styles for typography advanced options
This commit is contained in:
parent
0da16c7219
commit
62d98ad265
4 changed files with 15 additions and 13 deletions
|
@ -13,13 +13,21 @@
|
|||
[app.util.dom :as dom]))
|
||||
|
||||
(mf/defc advanced-options [{:keys [visible? on-close children]}]
|
||||
(let [handle-click (fn [event] (when on-close
|
||||
(let [ref (mf/use-ref nil)
|
||||
handle-click (fn [event] (when on-close
|
||||
(do (dom/stop-propagation event)
|
||||
(on-close))))]
|
||||
(mf/use-effect
|
||||
(mf/deps visible?)
|
||||
(fn []
|
||||
(when-let [node (mf/ref-val ref)]
|
||||
(when visible?
|
||||
(.scrollIntoViewIfNeeded ^js node)))))
|
||||
|
||||
(when visible?
|
||||
[:*
|
||||
[:div.focus-overlay {:on-click handle-click}]
|
||||
[:div.advanced-options-wrapper
|
||||
[:div.advanced-options-wrapper {:ref ref}
|
||||
[:div.advanced-options {}
|
||||
children]]])))
|
||||
|
||||
|
|
|
@ -270,7 +270,7 @@
|
|||
(if read-only?
|
||||
[:div.element-set-content.typography-read-only-data
|
||||
[:div.row-flex.typography-name
|
||||
[:spang (:name typography)]]
|
||||
[:span (:name typography)]]
|
||||
|
||||
[:div.row-flex
|
||||
[:span.label (t locale "workspace.assets.typography.font-id")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue