Skip to content

Commit

Permalink
Merge pull request #55 from jkf91/dev
Browse files Browse the repository at this point in the history
[refactor] Give fixed width to timestamp and favorite button
  • Loading branch information
a-nguyen committed Sep 15, 2015
2 parents 02a482e + 396114f commit 0e12318
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions client/src/message.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,13 @@ var Message = React.createClass({
this.props.sessions[this.props.auth.uid] && this.props.sessions[this.props.auth.uid].favorites && this.props.sessions[this.props.auth.uid].favorites.hasOwnProperty(this.props.messageId) ?
{
float: 'left',
marginLeft: '10px',
marginRight: '10px',
fontSize: '1.85em',
color: '#F12938' // red if favorited
}
:
{
float: 'left',
marginLeft: '10px',
marginRight: '10px',
fontSize: '1.85em',
color: '#fff1d3' // if NOT favorited
Expand All @@ -149,12 +147,12 @@ var Message = React.createClass({
</div>

<div className="col-xs-12" style={{paddingLeft:'10px'}}>
<div style = { styleFavorites }>
<span style={ {float: "right"} } onClick={ this.toggleFavorite }>
<div className="col-xs-1" style = { styleFavorites }>
<span style={ {float: "left"} } onClick={ this.toggleFavorite }>
<i className="glyphicon glyphicon-heart"></i>
</span>
</div>
<div style={ this.styles.timestamp }>
<div className="col-xs-2" style={ this.styles.timestamp }>
<i className="glyphicon glyphicon-time" style={ this.styles.iconStyle }></i>
<span style={{fontFamily:"Alegreya", fontStyle: "italic", fontSize: '.8em', position: 'relative', top: '-7px'}}>
{ moment(this.props.timestamp).fromNow() }
Expand Down

0 comments on commit 0e12318

Please sign in to comment.