From 12896bd23eeba79884245c1c29fdc568cf21a7fa Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Mon, 14 Mar 2016 08:50:46 -0400 Subject: Converting to Webpack. Stage 1. --- webapp/components/unread_channel_indicator.jsx | 34 ++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 webapp/components/unread_channel_indicator.jsx (limited to 'webapp/components/unread_channel_indicator.jsx') diff --git a/webapp/components/unread_channel_indicator.jsx b/webapp/components/unread_channel_indicator.jsx new file mode 100644 index 000000000..ee62a3e43 --- /dev/null +++ b/webapp/components/unread_channel_indicator.jsx @@ -0,0 +1,34 @@ +// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. +// See License.txt for license information. + +// Indicator for the left sidebar which indicate if there's unread posts in a channel that is not shown +// because it is either above or below the screen +import React from 'react'; + +export default class UnreadChannelIndicator extends React.Component { + render() { + let displayValue = 'none'; + if (this.props.show) { + displayValue = 'block'; + } + return ( +
+ {this.props.text} +
+ ); + } +} + +UnreadChannelIndicator.defaultProps = { + show: false, + extraClass: '', + text: '' +}; +UnreadChannelIndicator.propTypes = { + show: React.PropTypes.bool, + extraClass: React.PropTypes.string, + text: React.PropTypes.object +}; -- cgit v1.2.3-1-g7c22