Youtube music and video downloader

Input.jsx 461B

12345678910111213141516171819
  1. import React, {Component, PropTypes} from 'react';
  2. export default class Input extends Component {
  3. handleChange(e) {
  4. this.props.change(e.target.value);
  5. }
  6. render() {
  7. return (
  8. <input type="text" ref="textInput" placeholder="Search a video" autoFocus
  9. value={this.props.value} className="new-link" onChange={this.handleChange.bind(this)} />
  10. );
  11. }
  12. }
  13. Input.propTypes = {
  14. change: PropTypes.func.isRequired,
  15. value: PropTypes.string.isRequired
  16. };