Updating notification styles
Pretifying changes
This commit is contained in:
@@ -164,6 +164,33 @@ var TabBar = React.createClass({
|
|||||||
var thisObj = this;
|
var thisObj = this;
|
||||||
var tabs = this.props.teams.map(function(team, index) {
|
var tabs = this.props.teams.map(function(team, index) {
|
||||||
var unreadCount = 0;
|
var unreadCount = 0;
|
||||||
|
var badgeStyle = {
|
||||||
|
unread: {
|
||||||
|
background: '#383838',
|
||||||
|
float: 'right',
|
||||||
|
color: 'white',
|
||||||
|
textAlign: 'center',
|
||||||
|
marginTop: '5px',
|
||||||
|
width: '10px',
|
||||||
|
height: '10px',
|
||||||
|
marginLeft: '5px',
|
||||||
|
borderRadius: '50%',
|
||||||
|
},
|
||||||
|
|
||||||
|
mention: {
|
||||||
|
background: '#f1342c',
|
||||||
|
float: 'right',
|
||||||
|
color: 'white',
|
||||||
|
minWidth: '19px',
|
||||||
|
fontSize: '12px',
|
||||||
|
textAlign: 'center',
|
||||||
|
lineHeight: '20px',
|
||||||
|
height: '19px',
|
||||||
|
marginLeft: '5px',
|
||||||
|
borderRadius: '50%',
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
if (thisObj.props.unreadCounts[index] > 0) {
|
if (thisObj.props.unreadCounts[index] > 0) {
|
||||||
unreadCount = thisObj.props.unreadCounts[index];
|
unreadCount = thisObj.props.unreadCounts[index];
|
||||||
}
|
}
|
||||||
@@ -181,13 +208,11 @@ var TabBar = React.createClass({
|
|||||||
|
|
||||||
var badge;
|
var badge;
|
||||||
if (mentionCount != 0) {
|
if (mentionCount != 0) {
|
||||||
badge = (<Badge>
|
badge = (<div style={ badgeStyle.mention }>
|
||||||
{ mentionCount }
|
{ mentionCount }
|
||||||
</Badge>);
|
</div>);
|
||||||
} else if (unreadCount > 0) {
|
} else if (unreadCount > 0) {
|
||||||
badge = (<Badge>
|
badge = (<div style={ badgeStyle.unread }></div>);
|
||||||
•
|
|
||||||
</Badge>);
|
|
||||||
}
|
}
|
||||||
return (<NavItem className="teamTabItem" id={ 'teamTabItem' + index } eventKey={ index }>
|
return (<NavItem className="teamTabItem" id={ 'teamTabItem' + index } eventKey={ index }>
|
||||||
{ team.name }
|
{ team.name }
|
||||||
|
Reference in New Issue
Block a user