Created
October 22, 2015 04:32
-
-
Save ColeMurray/9d50e8324765f5ec0357 to your computer and use it in GitHub Desktop.
A header wrapper in react
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
import React from 'react' | |
import TodoTextInput from './TodoTextInput.react' | |
class Header extends React.Component { | |
constructor(props) { | |
super(props) | |
} | |
onSave(text) { | |
console.log(text) | |
} | |
render() { | |
const pHolder = "Todos" | |
return ( | |
<div> | |
<h2>Todo List</h2> | |
<TodoTextInput onSave={this.onSave.bind(this)} placeholder={pHolder} /> | |
</div> | |
) | |
} | |
} | |
export default Header |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment