mirror of
https://github.com/penpot/penpot.git
synced 2025-03-28 07:31:25 -05:00
💄 Minor improvements on dropdown component.
This commit is contained in:
parent
0e6f713685
commit
18db775954
1 changed files with 4 additions and 4 deletions
|
@ -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…
Add table
Reference in a new issue