ant-design/components/input/Group.tsx
Benjy Cui 3411765ce9 Refactor ts (#2760)
* refactor: add interface form Calendar

* refactor: add interface for layout

* refactor: add interface for DatePicker

* refactor: add interface for Icon

* refactor: add interface for InputNumber

* refactor: add interface for Input
2016-08-19 17:11:06 +08:00

28 lines
638 B
TypeScript

import * as React from 'react';
import classNames from 'classnames';
export interface GroupProps {
size?: 'large' | 'small' | 'default';
className?: string;
children?: any;
style?: React.CSSProperties;
}
export default function Group(props: GroupProps) {
const className = classNames({
'ant-input-group': true,
'ant-input-group-lg': props.size === 'large',
'ant-input-group-sm': props.size === 'small',
[props.className]: !!props.className,
});
return (
<span className={className} style={props.style}>
{props.children}
</span>
);
}
Group.propTypes = {
children: React.PropTypes.any,
};