mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
* PLT-7119 - Updating headings on compact view * PLT-7103 - Removing line below channel intro * PLT-7112 - Fixing system console banner * PLT-7144 - Adding ellipsis to system console boxes * PLT-7181 - Changing channel header opacity * PLT-6899 - Updating unread bar * Updating margin for new messages indicator
42 lines
1.1 KiB
JavaScript
42 lines
1.1 KiB
JavaScript
import PropTypes from 'prop-types';
|
|
|
|
// Copyright (c) 2015-present 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';
|
|
import Constants from 'utils/constants.jsx';
|
|
|
|
export default function UnreadChannelIndicator(props) {
|
|
const unreadIcon = Constants.UNREAD_ICON_SVG;
|
|
let displayValue = 'none';
|
|
if (props.show) {
|
|
displayValue = 'block';
|
|
}
|
|
|
|
return (
|
|
<div
|
|
className={'nav-pills__unread-indicator ' + props.extraClass}
|
|
style={{display: displayValue}}
|
|
>
|
|
{props.text}
|
|
<span
|
|
className='icon icon__unread'
|
|
dangerouslySetInnerHTML={{__html: unreadIcon}}
|
|
/>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
UnreadChannelIndicator.defaultProps = {
|
|
show: false,
|
|
extraClass: '',
|
|
text: ''
|
|
};
|
|
UnreadChannelIndicator.propTypes = {
|
|
show: PropTypes.bool,
|
|
extraClass: PropTypes.string,
|
|
text: PropTypes.object
|
|
};
|