import React from 'react'
import css from './type.scss'

export default class Type extends React.Component {


  render() {
    const {contentShow, kw, onType, onFocus, onClose, lang, keypress} = this.props
    return (
      <div className={`${css["ks-type"]} s-b-primary`}>
        <i className={`${css["ks-search-icon"]} ks-iconfont ks-icon-sousuo1 s-hint`}></i>
        <input type="text" placeholder={lang.search} value={kw} onChange={onType} onFocus={onFocus}
               onKeyPress={keypress}/>
        {contentShow ? <i className={`${css["close"]} s-hint ks-iconfont ks-icon-close`} onClick={onClose}/> : null}
      </div>
    )
  }
}