1234567891011121314151617181920212223242526 |
- import React from "react"
- export default class extends React.Component {
- getClassName() {
- if (this.props.className) {
- return "form-search " + this.props.className
- } else {
- return "form-search"
- }
- }
- render() {
- return (
- <div className={this.getClassName()}>
- <input
- type="text"
- className="form-control"
- value={this.props.value}
- onChange={this.props.onChange}
- placeholder={this.props.placeholder || gettext("Search...")}
- />
- <span className="material-icon">search</span>
- </div>
- )
- }
- }
|