index.js 665 Bytes
Newer Older
zhanghaozhe committed
1 2 3 4
import React, { Component } from "react"
import ClearableInput from "src/common/ClearableInput"
import "./index.scss"
import { Link } from "react-router-dom"
zhanghaozhe committed
5 6

class ClearableInputWithCountryCodes extends Component {
zhanghaozhe committed
7 8 9 10 11 12 13 14 15 16 17 18 19 20
  render() {
    const { country, ...rest } = this.props
    return (
      <div className={"clearable-input-with-country-codes"}>
        <div className="country-code">
          <Link to={"/country"}>
            +{(country && country.num) || 86}
            <i className={"iconfont iconiconfront-69"} />
          </Link>
        </div>
        <ClearableInput {...rest} />
      </div>
    )
  }
zhanghaozhe committed
21 22
}

zhanghaozhe committed
23
export default ClearableInputWithCountryCodes