mirror of
https://github.com/penpot/penpot.git
synced 2026-05-01 06:08:09 +00:00
💄 Minor improvements on dropdown component.
This commit is contained in:
parent
0e6f713685
commit
18db775954
@ -7,7 +7,7 @@
|
||||
(:import goog.events.EventType
|
||||
goog.events.KeyCodes))
|
||||
|
||||
(mf/defrc dropdown'
|
||||
(mf/defrc dropdown-container
|
||||
[props]
|
||||
(let [children (gobj/get props "children")
|
||||
on-close (gobj/get props "on-close")
|
||||
@ -30,10 +30,10 @@
|
||||
(events/unlistenByKey lkey2))))]
|
||||
|
||||
(mf/use-effect {:fn on-mount})
|
||||
[:div.dropdown
|
||||
children]))
|
||||
children))
|
||||
|
||||
(mf/defrc dropdown
|
||||
[props]
|
||||
(when (gobj/get props "show")
|
||||
(mf/element dropdown' props)))
|
||||
[:div.dropdown
|
||||
(mf/element dropdown-container props)]))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user