mattermost-mobile/app/components/channel_list/unread_indicator.js
enahum bfd70f742c Modal with options (#179)
* modal options and channel long press

* PureComponent optimization (#183)

* Bug fix when leaving the current channel

* Rebased with new navigation

* Add disabled drawer to unit test

* re-organize modal up in the stack and controlled by redux

* renaming modalOptions to optionsModal
2017-01-30 08:41:14 -05:00

43 lines
1.1 KiB
JavaScript

// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
import React from 'react';
import PureRenderMixin from 'react-addons-pure-render-mixin';
import {StyleSheet, Text, View} from 'react-native';
const Styles = StyleSheet.create({
container: {
justifyContent: 'center',
alignItems: 'center',
flexDirection: 'row',
position: 'absolute',
borderRadius: 15,
marginLeft: 25,
width: 250,
height: 25
}
});
export default class UnreadIndicator extends React.Component {
static propTypes = {
style: View.propTypes.style,
textStyle: Text.propTypes.style,
text: React.PropTypes.node.isRequired
};
constructor(props) {
super(props);
this.shouldComponentUpdate = PureRenderMixin.shouldComponentUpdate.bind(this);
}
render() {
return (
<View
style={[Styles.container, this.props.style]}
>
{this.props.text}
</View>
);
}
}