Skip to content

Commit

Permalink
added course selected styles
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxnelson997 committed Jun 1, 2018
1 parent 39767d5 commit 5b3a745
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/arrow.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Arrow extends Component {
render() {
this.id = `arrow-${this.props.id}`
return (
<a id={this.id} onClick={() => this.toggleArrow()}className={`${this.props.className} arrow`}></a>
<a id={this.id} onClick={() => this.toggleArrow()} className={`${this.props.className} arrow`}></a>
)
}
}
Expand Down
7 changes: 6 additions & 1 deletion src/components/library/libraryCourse.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,17 @@ class LibraryCourse extends Component {
}.bind(this);

handleCallback = function(status) {
if(!status) {
document.getElementById('library-course').classList.add('library-course-selected');
} else {
document.getElementById('library-course').classList.remove('library-course-selected');
}
this.setState({ status })
}.bind(this)

render() {
return (
<div className="library-course">
<div id="library-course" className="library-course">
<div className="library-course__title-check">
<label className="library-course__title">{this.props.title}</label>
{Icon("fas fa-check", "library-course__icon")}
Expand Down
12 changes: 10 additions & 2 deletions src/style/libraryCourse.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,21 @@
}
}

@mixin solid-course {
background: white;
box-shadow: 0 2px 10px 0 rgba(0,0,0,0.21);
}

.library-course-selected {
@include solid-course();
}

.library-course {

padding: 25px;

&:hover {
background: white;
box-shadow: 0 2px 10px 0 rgba(0,0,0,0.21);
@include solid-course();
}

&__title {
Expand Down

0 comments on commit 5b3a745

Please sign in to comment.