quick-search.js 657 B

1234567891011121314151617181920212223242526
  1. import React from 'react';
  2. export default class extends React.Component {
  3. getClassName() {
  4. if (this.props.className) {
  5. return "form-search " + this.props.className;
  6. } else {
  7. return "form-search";
  8. }
  9. }
  10. render() {
  11. /* jshint ignore:start */
  12. return <div className={this.getClassName()}>
  13. <input type="text"
  14. className="form-control"
  15. value={this.props.value}
  16. onChange={this.props.onChange}
  17. placeholder={this.props.placeholder || gettext("Search...")} />
  18. <span className="material-icon">
  19. search
  20. </span>
  21. </div>;
  22. /* jshint ignore:end */
  23. }
  24. }