mattermost-mobile/app/scenes/channel/channel_menu_button.js
Chris Duarte ce58429a21 Reworking navigation (#212)
* Reworking navigation

* Fixed navigation testing and lint errors
2017-02-02 16:13:25 -05:00

47 lines
1.2 KiB
JavaScript

// Copyright (c) 2017 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
import React, {PropTypes} from 'react';
import {connect} from 'react-redux';
import {
TouchableOpacity,
View
} from 'react-native';
import Icon from 'react-native-vector-icons/FontAwesome';
import {getTheme} from 'service/selectors/entities/preferences';
function ChannelMenuButton(props) {
return (
<View style={{flexDirection: 'column', justifyContent: 'center', alignItems: 'center', flex: 1}}>
<TouchableOpacity
onPress={() => props.emitter('open_right_menu')}
style={{height: 25, width: 25, marginLeft: 10, marginRight: 10}}
>
<Icon
name='ellipsis-v'
size={25}
color={props.theme.sidebarHeaderTextColor}
/>
</TouchableOpacity>
</View>
);
}
ChannelMenuButton.propTypes = {
emitter: PropTypes.func.isRequired,
theme: PropTypes.object
};
ChannelMenuButton.defaultProps = {
currentChannel: {},
theme: {}
};
function mapStateToProps(state) {
return {
theme: getTheme(state)
};
}
export default connect(mapStateToProps)(ChannelMenuButton);