You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
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 = '';
|
|
|
|
if (this.props.size === 'large') {
|
|
|
|
sizeClass = 'ant-select-lg';
|
|
|
|
} else if (this.props.size === 'small') {
|
|
|
|
sizeClass = 'ant-select-sm';
|
|
|
|
}
|
|
|
|
return (
|
|
|
|
<Select className={sizeClass} {...this.props} />
|
|
|
|
);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
AntSelect.Option = Select.Option;
|
|
|
|
AntSelect.OptGroup = Select.OptGroup;
|
|
|
|
|
|
|
|
export default AntSelect;
|