From 4e9050e3b2a5fed88318bc3b7a600cfb19f7ea80 Mon Sep 17 00:00:00 2001 From: RC Date: Tue, 8 Nov 2016 11:35:05 +0530 Subject: [PATCH] fix(): Fixing the unused props issue with TimelineEvent --- components/TimelineEvent.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/components/TimelineEvent.js b/components/TimelineEvent.js index 212fb2f..9f253c8 100644 --- a/components/TimelineEvent.js +++ b/components/TimelineEvent.js @@ -3,8 +3,7 @@ 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 { @@ -12,8 +11,7 @@ class TimelineEvent extends Component { } } - contentStyle () { - const {contentStyle} = this.props + mergeContentStyle (contentStyle) { if (contentStyle) { return {...s.message, ...contentStyle} } else { @@ -24,7 +22,7 @@ class TimelineEvent extends Component { render () { const {createdAt, title, contentStyle, buttons, icon, iconColor, ...otherProps} = this.props return
-
+
{icon}
@@ -33,7 +31,7 @@ class TimelineEvent extends Component {
{title}
{buttons}
-
+
{this.props.children}