import * as React from 'react'; import Icon from '../icon'; import classNames from 'classnames'; export default function InputIcon(props: { suffixIcon: any; prefixCls: string }) { const { suffixIcon, prefixCls } = props; return ( (suffixIcon && (React.isValidElement<{ className?: string }>(suffixIcon) ? ( React.cloneElement(suffixIcon, { className: classNames({ [suffixIcon.props.className!]: suffixIcon.props.className, [`${prefixCls}-picker-icon`]: true, }), }) ) : ( {suffixIcon} ))) || ); }