[RN] Implement a new UI for the Toolbox

- 5 buttons in the (now single) toolbar
- Overflow menu in the form of a BottomSheet
- Filmstrip on the right when in wide mode
This commit is contained in:
Saúl Ibarra Corretgé
2018-05-15 13:18:42 +02:00
committed by Lyubo Marinov
parent c344a83376
commit f54f5df428
9 changed files with 412 additions and 312 deletions

View File

@@ -0,0 +1,39 @@
// @flow
import { connect } from 'react-redux';
import { openDialog } from '../../../base/dialog';
import { translate } from '../../../base/i18n';
import { AbstractButton } from '../../../base/toolbox';
import type { AbstractButtonProps } from '../../../base/toolbox';
import OverflowMenu from './OverflowMenu';
type Props = AbstractButtonProps & {
/**
* The redux {@code dispatch} function.
*/
dispatch: Function
}
/**
* An implementation of a button for showing the {@code OverflowMenu}.
*/
class OverflowMenuButton extends AbstractButton<Props, *> {
accessibilityLabel = 'Overflow menu';
iconName = 'icon-thumb-menu';
label = 'toolbar.moreActions';
/**
* Handles clicking / pressing the button.
*
* @private
* @returns {void}
*/
_handleClick() {
this.props.dispatch(openDialog(OverflowMenu));
}
}
export default translate(connect()(OverflowMenuButton));