Skip to content

Instantly share code, notes, and snippets.

@dai-shi
Created March 28, 2016 08:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dai-shi/03404d1b18a5a2108b0c to your computer and use it in GitHub Desktop.
Save dai-shi/03404d1b18a5a2108b0c to your computer and use it in GitHub Desktop.
diff --git a/imports/ui/Task.jsx b/imports/ui/Task.jsx
index deba74a..bec76ba 100644
--- a/imports/ui/Task.jsx
+++ b/imports/ui/Task.jsx
@@ -30,6 +30,12 @@ export default class Task extends Component {
onClick={this.toggleChecked.bind(this)}
/>
+ { this.props.showPrivateButton ? (
+ <button className="toggle-private" onClick={this.togglePrivate.bind(this)}>
+ { this.props.task.private ? 'Private' : 'Public' }
+ </button>
+ ) : ''}
+
<span className="text">
<strong>{this.props.task.username}</strong>: {this.props.task.text}
</span>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment