2015-12-02 15:18:15 +08:00
|
|
|
import React from 'react';
|
|
|
|
import Dropdown from 'rc-dropdown';
|
|
|
|
|
|
|
|
export default React.createClass({
|
2016-01-05 14:42:06 +08:00
|
|
|
getDefaultProps() {
|
2015-12-02 15:18:15 +08:00
|
|
|
return {
|
|
|
|
transitionName: 'slide-up',
|
|
|
|
prefixCls: 'ant-dropdown',
|
|
|
|
};
|
|
|
|
},
|
2016-01-05 14:42:06 +08:00
|
|
|
render() {
|
2015-12-31 17:55:45 +08:00
|
|
|
const { overlay, ...otherProps } = this.props;
|
|
|
|
const menu = React.cloneElement(overlay, {
|
|
|
|
openTransitionName: 'zoom-big',
|
|
|
|
});
|
2015-12-02 15:18:15 +08:00
|
|
|
return (
|
2015-12-31 17:55:45 +08:00
|
|
|
<Dropdown {...otherProps} overlay={menu} />
|
2015-12-02 15:18:15 +08:00
|
|
|
);
|
|
|
|
}
|
|
|
|
});
|