Browse Source

Step 11.8: Add private className to Task when needed.

Frederic G. MARAND 8 years ago
parent
commit
aea69174a7
1 changed files with 2 additions and 1 deletions
  1. 2 1
      Task.jsx

+ 2 - 1
Task.jsx

@@ -24,7 +24,8 @@ Task = React.createClass({
   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 = (this.props.task.checked ? 'checked' : '') + " " +
+      (this.props.task.private ? "private" : "");
 
     let result = (
       <li className={taskClassName}>