File tree Expand file tree Collapse file tree 3 files changed +68
-60
lines changed
src/components/composites Expand file tree Collapse file tree 3 files changed +68
-60
lines changed Original file line number Diff line number Diff line change 36
36
" prettier --write"
37
37
]
38
38
},
39
- "version" : " 3.4.0-rc.5 " ,
39
+ "version" : " 3.4.0-rc.6 " ,
40
40
"license" : " MIT" ,
41
41
"private" : false ,
42
42
"main" : " lib/commonjs/index" ,
Original file line number Diff line number Diff line change @@ -79,34 +79,36 @@ const Menu = (
79
79
return (
80
80
< >
81
81
{ updatedTrigger ( ) }
82
- < Overlay
83
- isOpen = { isOpen }
84
- onRequestClose = { handleClose }
85
- useRNModalOnAndroid
86
- { ..._overlay }
87
- >
88
- < PresenceTransition visible = { isOpen } { ..._presenceTransition } >
89
- < Popper
90
- triggerRef = { triggerRef }
91
- onClose = { handleClose }
92
- placement = { placement }
93
- { ...resolvedProps }
94
- >
95
- < Backdrop onPress = { handleClose } { ..._backdrop } />
96
- < Popper . Content isOpen = { isOpen } >
97
- < MenuContext . Provider
98
- value = { { closeOnSelect, onClose : handleClose } }
99
- >
100
- < FocusScope contain restoreFocus autoFocus >
101
- < MenuContent menuRef = { ref } { ...resolvedProps } >
102
- { children }
103
- </ MenuContent >
104
- </ FocusScope >
105
- </ MenuContext . Provider >
106
- </ Popper . Content >
107
- </ Popper >
108
- </ PresenceTransition >
109
- </ Overlay >
82
+ { isOpen && (
83
+ < Overlay
84
+ isOpen = { isOpen }
85
+ onRequestClose = { handleClose }
86
+ useRNModalOnAndroid
87
+ { ..._overlay }
88
+ >
89
+ < PresenceTransition visible = { isOpen } { ..._presenceTransition } >
90
+ < Popper
91
+ triggerRef = { triggerRef }
92
+ onClose = { handleClose }
93
+ placement = { placement }
94
+ { ...resolvedProps }
95
+ >
96
+ < Backdrop onPress = { handleClose } { ..._backdrop } />
97
+ < Popper . Content isOpen = { isOpen } >
98
+ < MenuContext . Provider
99
+ value = { { closeOnSelect, onClose : handleClose } }
100
+ >
101
+ < FocusScope contain restoreFocus autoFocus >
102
+ < MenuContent menuRef = { ref } { ...resolvedProps } >
103
+ { children }
104
+ </ MenuContent >
105
+ </ FocusScope >
106
+ </ MenuContext . Provider >
107
+ </ Popper . Content >
108
+ </ Popper >
109
+ </ PresenceTransition >
110
+ </ Overlay >
111
+ ) }
110
112
</ >
111
113
) ;
112
114
} ;
Original file line number Diff line number Diff line change @@ -73,38 +73,44 @@ const Popover = (
73
73
return (
74
74
< Box ref = { ref } >
75
75
{ updatedTrigger ( ) }
76
- < Overlay isOpen = { isOpen } onRequestClose = { handleClose } useRNModalOnAndroid >
77
- < PresenceTransition
78
- initial = { { opacity : 0 } }
79
- animate = { { opacity : 1 , transition : { duration : 150 } } }
80
- exit = { { opacity : 0 , scale : 0.95 , transition : { duration : 100 } } }
81
- visible = { isOpen }
82
- style = { StyleSheet . absoluteFill }
76
+ { isOpen && (
77
+ < Overlay
78
+ isOpen = { isOpen }
79
+ onRequestClose = { handleClose }
80
+ useRNModalOnAndroid
83
81
>
84
- < Popper onClose = { handleClose } triggerRef = { triggerRef } { ...props } >
85
- < Backdrop onPress = { handleClose } bg = "transparent" />
86
- < PopoverContext . Provider
87
- value = { {
88
- onClose : handleClose ,
89
- initialFocusRef,
90
- finalFocusRef,
91
- popoverContentId,
92
- bodyId,
93
- headerId,
94
- headerMounted,
95
- bodyMounted,
96
- setBodyMounted,
97
- setHeaderMounted,
98
- isOpen,
99
- } }
100
- >
101
- < FocusScope contain = { trapFocus } restoreFocus autoFocus >
102
- { children }
103
- </ FocusScope >
104
- </ PopoverContext . Provider >
105
- </ Popper >
106
- </ PresenceTransition >
107
- </ Overlay >
82
+ < PresenceTransition
83
+ initial = { { opacity : 0 } }
84
+ animate = { { opacity : 1 , transition : { duration : 150 } } }
85
+ exit = { { opacity : 0 , scale : 0.95 , transition : { duration : 100 } } }
86
+ visible = { isOpen }
87
+ style = { StyleSheet . absoluteFill }
88
+ >
89
+ < Popper onClose = { handleClose } triggerRef = { triggerRef } { ...props } >
90
+ < Backdrop onPress = { handleClose } bg = "transparent" />
91
+ < PopoverContext . Provider
92
+ value = { {
93
+ onClose : handleClose ,
94
+ initialFocusRef,
95
+ finalFocusRef,
96
+ popoverContentId,
97
+ bodyId,
98
+ headerId,
99
+ headerMounted,
100
+ bodyMounted,
101
+ setBodyMounted,
102
+ setHeaderMounted,
103
+ isOpen,
104
+ } }
105
+ >
106
+ < FocusScope contain = { trapFocus } restoreFocus autoFocus >
107
+ { children }
108
+ </ FocusScope >
109
+ </ PopoverContext . Provider >
110
+ </ Popper >
111
+ </ PresenceTransition >
112
+ </ Overlay >
113
+ ) }
108
114
</ Box >
109
115
) ;
110
116
} ;
You can’t perform that action at this time.
0 commit comments