import React from 'react'; function prefixClsFn(prefixCls, ...args) { return args.map((s)=> { return prefixCls + '-' + s; }).join(' '); } function ieGT9() { if (typeof document === undefined) { return false; } const documentMode = document.documentMode || 0; return documentMode > 9; } class Group extends React.Component { render() { const className = 'ant-input-group ' + (this.props.className || ''); return ( {this.props.children} ); } } Group.propTypes = { children: React.PropTypes.any, }; class Input extends React.Component { renderLabledInput(children) { const props = this.props; const wrapperClassName = prefixClsFn(props.prefixCls, 'input-group'); const addonClassName = prefixClsFn(wrapperClassName, 'addon'); const addonBefore = props.addonBefore ? ( {props.addonBefore} ) : null; const addonAfter = props.addonAfter ? ( {props.addonAfter} ) : null; return ( {addonBefore} {children} {addonAfter} ); } renderInput() { const props = this.props; const prefixCls = props.prefixCls; let inputClassName = prefixClsFn(prefixCls, 'input'); if (!props.type) { return props.children; } switch (props.size) { case 'small': inputClassName = prefixClsFn(prefixCls, 'input', 'input-sm'); break; case 'large': inputClassName = prefixClsFn(prefixCls, 'input', 'input-lg'); break; default: } let placeholder = props.placeholder; if(placeholder && ieGT9()){ placeholder = null; } switch (props.type) { case 'textarea': return