Преглед изворни кода

[RN] Dismiss OverflowMenu after selecting an option

master
Saúl Ibarra Corretgé пре 7 година
родитељ
комит
a8b1ca38dc
1 измењених фајлова са 11 додато и 15 уклоњено
  1. 11
    15
      react/features/toolbox/components/native/OverflowMenu.js

+ 11
- 15
react/features/toolbox/components/native/OverflowMenu.js Прегледај датотеку

56
      * @returns {ReactElement}
56
      * @returns {ReactElement}
57
      */
57
      */
58
     render() {
58
     render() {
59
+        const buttonProps = {
60
+            afterClick: this._onCancel,
61
+            showLabel: true,
62
+            styles: overflowMenuItemStyles
63
+        };
64
+
59
         return (
65
         return (
60
             <BottomSheet onCancel = { this._onCancel }>
66
             <BottomSheet onCancel = { this._onCancel }>
61
-                <AudioRouteButton
62
-                    showLabel = { true }
63
-                    styles = { overflowMenuItemStyles } />
64
-                <ToggleCameraButton
65
-                    showLabel = { true }
66
-                    styles = { overflowMenuItemStyles } />
67
-                <AudioOnlyButton
68
-                    showLabel = { true }
69
-                    styles = { overflowMenuItemStyles } />
70
-                <RoomLockButton
71
-                    showLabel = { true }
72
-                    styles = { overflowMenuItemStyles } />
73
-                <PictureInPictureButton
74
-                    showLabel = { true }
75
-                    styles = { overflowMenuItemStyles } />
67
+                <AudioRouteButton { ...buttonProps } />
68
+                <ToggleCameraButton { ...buttonProps } />
69
+                <AudioOnlyButton { ...buttonProps } />
70
+                <RoomLockButton { ...buttonProps } />
71
+                <PictureInPictureButton { ...buttonProps } />
76
             </BottomSheet>
72
             </BottomSheet>
77
         );
73
         );
78
     }
74
     }

Loading…
Откажи
Сачувај