mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-01 03:29:39 +08:00
31 lines
634 B
JavaScript
31 lines
634 B
JavaScript
import React from 'react';
|
|
import Select from 'rc-select';
|
|
|
|
var AntSelect = React.createClass({
|
|
getDefaultProps() {
|
|
return {
|
|
prefixCls: 'ant-select',
|
|
transitionName: 'slide-up',
|
|
optionLabelProp: 'children',
|
|
showSearch: false
|
|
};
|
|
},
|
|
render() {
|
|
var sizeClass = 'ant-select-';
|
|
if(this.props.size === 'large'){
|
|
sizeClass += 'lg';
|
|
}
|
|
if(this.props.size === 'small'){
|
|
sizeClass += 'sm';
|
|
}
|
|
return (
|
|
<Select className={sizeClass} {...this.props} />
|
|
);
|
|
}
|
|
});
|
|
|
|
AntSelect.Option = Select.Option;
|
|
AntSelect.OptGroup = Select.OptGroup;
|
|
|
|
export default AntSelect;
|