Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Nicolas Goutay
committed
Feb 27, 2016
1 parent
d1d2a56
commit 90fe2cc
Showing
4 changed files
with
46 additions
and
19 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import React from 'react'; | ||
|
||
export default React.createClass({ | ||
render: function () { | ||
return <input className="edit" | ||
autoFocus={true} | ||
type="text" /> | ||
} | ||
}); |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import React from 'react'; | ||
|
||
import TextInput from './TextInput'; | ||
|
||
export default React.createClass({ | ||
|
||
render: function () { | ||
return <li className="todo"> | ||
<div className="view"> | ||
<input type="checkbox" | ||
className="toggle" /> | ||
<label htmlFor="todo"> | ||
{this.props.text} | ||
</label> | ||
<button className="destroy"></button> | ||
</div> | ||
<TextInput /> | ||
</li> | ||
} | ||
}); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import React from 'react'; | ||
import TodoItem from './TodoItem'; | ||
|
||
export default React.createClass({ | ||
render: function () { | ||
return <section className="main"> | ||
<ul className="todo-list"> | ||
{this.props.todos.map(item => | ||
<TodoItem key={item.get('text')} | ||
text={item.get('text')} /> | ||
)} | ||
</ul> | ||
</section> | ||
} | ||
}); |