Skip to content

Commit

Permalink
fix(): Fixing the unused props issue with TimelineEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
rcdexta committed Nov 8, 2016
1 parent e5cf1a2 commit 4e9050e
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions components/TimelineEvent.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,15 @@ import s from './styles'

class TimelineEvent extends Component {

eventNotificationStyle () {
const {iconColor} = this.props
mergeNotificationStyle (iconColor) {
if (iconColor) {
return {...s.eventType, ...{color: iconColor, borderColor: iconColor}}
} else {
return s.eventType
}
}

contentStyle () {
const {contentStyle} = this.props
mergeContentStyle (contentStyle) {
if (contentStyle) {
return {...s.message, ...contentStyle}
} else {
Expand All @@ -24,7 +22,7 @@ class TimelineEvent extends Component {
render () {
const {createdAt, title, contentStyle, buttons, icon, iconColor, ...otherProps} = this.props
return <div style={s.event}>
<div style={this.eventNotificationStyle()}>
<div style={this.mergeNotificationStyle(iconColor)}>
<span style={s.materialIcons}>{icon}</span>
</div>
<div style={s.eventContent} {...otherProps}>
Expand All @@ -33,7 +31,7 @@ class TimelineEvent extends Component {
<div style={s.title}>{title}</div>
<div style={s.actionButtons}>{buttons}</div>
<div style={{clear: 'both', marginBottom: 10}} />
<div style={this.contentStyle()}>
<div style={this.mergeContentStyle(contentStyle)}>
{this.props.children}
<div style={s.messageAfter} />
</div>
Expand Down

0 comments on commit 4e9050e

Please sign in to comment.