import { Icon } from "office-ui-fabric-react/lib/Icon"; import * as React from "react"; import Button from "../button/Button"; import Required from "../required/Required"; export interface IInputProps { autoFocus?: boolean; autoComplete?: string; autoCorrect?: string; className?: string; defaultValue?: string; disabled?: boolean; id: string; inputType: string; min?: string; minLength?: number; max?: string; maxLength?: number; name: string; onBlur?: any; onFocus?: any; onChange?: any; onKeyUp?: any; pattern?: string; placeholder?: string; readOnly?: boolean; refs?: any; required?: boolean; showRequired?: boolean; step?: string; tabIndex?: number; value?: string; showValidation?: boolean; showTogglePassword?: boolean; } export interface IInputState { showPassword: boolean; } export default class Input extends React.Component { constructor(props: any) { super(props); this.state = { showPassword: false }; this._toggleShowPassword = this._toggleShowPassword.bind(this); } public render(): React.ReactElement { let className: string = "input"; if (this.props.showValidation) { className += " inputRequired"; } if (this.props.showTogglePassword) { className += " inputShowPassword"; } if (this.props.className) { className = this.props.className; } const showRequired: JSX.Element | null = this.props.showRequired ? ( ) : null; const showTogglePassword: JSX.Element | null = this.props .showTogglePassword ? (