Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea/
8 changes: 3 additions & 5 deletions both/components/Feed/FeedList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,14 @@ class FeedList extends React.Component {
/>;
})
}
<button className='more-btn'
onClick={this.props.incrementLimit}>
Load More
</button>
<MoreFeedItems incrementLimit={this.props.incrementLimit}/>
</div>
);
}
}
FeedList.propTypes = {
comments: React.PropTypes.array,
incrementLimit: React.PropTypes.func,
postItems: React.PropTypes.array
};

this.FeedList = FeedList;
10 changes: 0 additions & 10 deletions both/components/FeedItem/_FeedItem.scss
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,3 @@

}

// TODO move to correct place
.more-btn {
padding: 7px 15px;
margin: 10px 0 20px 200px; // FIXME
background-color: $primary;
color: #ffffff;
border: none;
cursor: pointer;
}

15 changes: 15 additions & 0 deletions both/components/MoreFeedItems/MoreFeedItems.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
this.MoreFeedItems = React.createClass({
propTypes: {
incrementLimit: React.PropTypes.func
},
render() {
return (
<div className='more-feed'>
<button className='more-feed__more-btn'
onClick={this.props.incrementLimit}>
Load More
</button>
</div>
);
}
});
17 changes: 17 additions & 0 deletions both/components/MoreFeedItems/_MoreFeedItems.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.more-feed {
width: 100%;
display: flex;
justify-content: center;
align-items: center;


&__more-btn {
padding: 7px 15px;
min-width: 20px;
margin-bottom: 13px;
background-color: $primary;
color: #ffffff;
border: none;
cursor: pointer;
}
}
1 change: 1 addition & 0 deletions client/styles/_components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
@import '../../both/components/ParamsExample/ParamsExample';
@import '../../both/components/CommentItem/CommentItem';
@import '../../both/components/Header/Header';
@import '../../both/components/MoreFeedItems/MoreFeedItems';