index.js 696 Bytes
Newer Older
zhanghaozhe committed
1 2 3
import React, { Component } from 'react';
import './index.scss'
import Input from '../Input'
zhanghaozhe committed
4
import { Link } from "react-router-dom";
zhanghaozhe committed
5 6 7

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

export default InputWithCountryCodes;