mattermost-mobile/app/components/channel_list/unread_indicator.js
enahum 5a5772bcd0 PLT-5545 Fix Unread above/below indicator size to fit on screen (#256)
* Fix Unread above/below indicator size to fit on screen size

* removing unnecessary flex
2017-02-16 09:29:57 -05:00

42 lines
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,
marginHorizontal: 15,
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>
);
}
}