import React from "react";
import {InputGroup,FormControl} from 'react-bootstrap'
import {LoginFormDesc} from "./LoginForm";
export class Input extends React.Component<LoginFormDesc, any>{

    render() {
        return (
            <InputGroup className="col-7 ml-auto mr-auto mt-3">
                <InputGroup.Prepend>
                    <InputGroup.Text id={this.props.name}>{this.props.desc}</InputGroup.Text>
                </InputGroup.Prepend>
                <FormControl placeholder={'请输入'+this.props.desc} aria-describedby={this.props.name} value={this.props.value}
                             onChange={(e)=>this.props.onChange(e.target.value)}/>
            </InputGroup>
        );
    }
}
