[RN] Dismiss OverflowMenu after selecting an option

This commit is contained in:
Saúl Ibarra Corretgé 2018-05-22 11:33:03 +02:00
parent 99b5a41269
commit a8b1ca38dc
1 changed files with 11 additions and 15 deletions

View File

@ -56,23 +56,19 @@ class OverflowMenu extends Component<Props> {
* @returns {ReactElement}
*/
render() {
const buttonProps = {
afterClick: this._onCancel,
showLabel: true,
styles: overflowMenuItemStyles
};
return (
<BottomSheet onCancel = { this._onCancel }>
<AudioRouteButton
showLabel = { true }
styles = { overflowMenuItemStyles } />
<ToggleCameraButton
showLabel = { true }
styles = { overflowMenuItemStyles } />
<AudioOnlyButton
showLabel = { true }
styles = { overflowMenuItemStyles } />
<RoomLockButton
showLabel = { true }
styles = { overflowMenuItemStyles } />
<PictureInPictureButton
showLabel = { true }
styles = { overflowMenuItemStyles } />
<AudioRouteButton { ...buttonProps } />
<ToggleCameraButton { ...buttonProps } />
<AudioOnlyButton { ...buttonProps } />
<RoomLockButton { ...buttonProps } />
<PictureInPictureButton { ...buttonProps } />
</BottomSheet>
);
}