Skip to content

Instantly share code, notes, and snippets.

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