Skip to content

Commit 9bfde96

Browse files
committed
Flux - 33 - CSS Animations
1 parent a3a6207 commit 9bfde96

File tree

2 files changed

+25
-4
lines changed

2 files changed

+25
-4
lines changed

imgur-client/sass/topic.scss

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
11
.topic {
22
text-align: center;
3+
4+
.image-preview {
5+
animation: fadein .65s ease-out;
6+
7+
@keyframes fadein {
8+
0% {
9+
opacity: 0;
10+
}
11+
100% {
12+
opacity: 1.0;
13+
}
14+
}
15+
}
316
}

imgur-client/src/components/comment-box.jsx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,17 @@ var React = require('react');
22

33
module.exports = React.createClass({
44
render: function(){
5-
return <div>
6-
I am a comment box.
7-
{this.props.comments}
8-
</div>
5+
return <ul className="list-group">
6+
{this.renderComments()}
7+
</ul>
8+
},
9+
renderComments: function() {
10+
return this.props.comments.slice(0, 20).map(function(comment){
11+
return <li className="list-group-item comment-box" key={comment.id}>
12+
<span className="badge">{comment.ups}</span>
13+
<h5>{comment.author}</h5>
14+
{comment.comment}
15+
</li>
16+
})
917
}
1018
});

0 commit comments

Comments
 (0)