Browse Source

Merge branch 'feature/IconColor' of kidder/comment into master

AdamFu 5 years ago
parent
commit
830c66cf88
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      src/components/ContentItem/index.js

+ 3
- 0
src/components/ContentItem/index.js View File

111
         imgs.splice(3, 0, { type: "divider" });
111
         imgs.splice(3, 0, { type: "divider" });
112
       }
112
       }
113
     }
113
     }
114
+    const IconColor = content.favor_count > 0 ? "#71C135" : "#4a90e2";
114
 
115
 
115
     return (
116
     return (
116
       <div className="comment-item-box">
117
       <div className="comment-item-box">
239
                 }
240
                 }
240
                 app.sCommentFavor(content.id, content.favored);
241
                 app.sCommentFavor(content.id, content.favored);
241
               }}
242
               }}
243
+              style={{ color: `${IconColor}` }}
242
             >
244
             >
243
               <Icon
245
               <Icon
244
                 type="like-o"
246
                 type="like-o"
247
                     ? "comment-favor comment-favored"
249
                     ? "comment-favor comment-favored"
248
                     : "comment-favor"
250
                     : "comment-favor"
249
                 }
251
                 }
252
+                style={{ color: `${IconColor}` }}
250
               />
253
               />
251
               &nbsp;{content.favor_count}
254
               &nbsp;{content.favor_count}
252
             </div>
255
             </div>