Browse Source

IconColor

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