| 12345678910111213141516171819 |
- import React, {Component, PropTypes} from 'react';
-
- export default class Input extends Component {
- handleChange(e) {
- this.props.change(e.target.value);
- }
-
- render() {
- return (
- <input type="text" ref="textInput" placeholder="Search a video" autoFocus
- value={this.props.value} className="new-link" onChange={this.handleChange.bind(this)} />
- );
- }
- }
-
- Input.propTypes = {
- change: PropTypes.func.isRequired,
- value: PropTypes.string.isRequired
- };
|