Skip to content

Instantly share code, notes, and snippets.

@iofjuupasli
Created March 14, 2016 14:45
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 iofjuupasli/0350c1bc9a6a31c1df8f to your computer and use it in GitHub Desktop.
Save iofjuupasli/0350c1bc9a6a31c1df8f to your computer and use it in GitHub Desktop.
return (
<li className={classNames({
completed: this.props.todo.completed,
editing: this.props.editing
})}>
<div className="view">
<input
className="toggle"
type="checkbox"
checked={this.props.todo.completed}
onChange={this.props.onToggle}
/>
<label onDoubleClick={this.handleEdit}>
{this.props.todo.title}
</label>
<button className="destroy" onClick={this.props.onDestroy} />
</div>
<input
ref="editField"
className="edit"
value={this.state.editText}
onBlur={this.handleSubmit}
onChange={this.handleChange}
onKeyDown={this.handleKeyDown}
/>
</li>
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment