Created
March 28, 2016 08:54
-
-
Save dai-shi/205c1a190d35732fc830 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/imports/ui/Task.jsx b/imports/ui/Task.jsx | |
index db0999e..52450c3 100644 | |
--- a/imports/ui/Task.jsx | |
+++ b/imports/ui/Task.jsx | |
@@ -1,5 +1,6 @@ | |
import React, { Component, PropTypes } from 'react'; | |
import { Meteor } from 'meteor/meteor'; | |
+import classnames from 'classnames'; | |
// Task component - represents a single todo item | |
export default class Task extends Component { | |
@@ -19,7 +20,10 @@ export default class Task extends Component { | |
render() { | |
// Give tasks a different className when they are checked off, | |
// so that we can style them nicely in CSS | |
- const taskClassName = this.props.task.checked ? 'checked' : ''; | |
+ const taskClassName = classnames({ | |
+ checked: this.props.task.checked, | |
+ private: this.props.task.private, | |
+ }); | |
return ( | |
<li className={taskClassName}> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment