import React from 'react';
import AntdDropdown from 'antd/es/dropdown';

import { ConfigConsumer } from '../config-provider';
import './index.less';

const Dropdown = props => (
  <ConfigConsumer>
    {({ getPrefixCls }) => {
      const { prefixCls: customizePrefixCls, ...restProps } = props;
      const prefixCls = getPrefixCls('dropdown', customizePrefixCls);
      return <AntdDropdown prefixCls={prefixCls} {...restProps} />;
    }}
  </ConfigConsumer>
);

// Dropdown.Button = props => (
//   <ConfigConsumer>
//     {({ getPrefixCls }) => {
//       const { prefixCls: customizePrefixCls, ...restProps } = props;
//       const prefixCls = getPrefixCls('dropdown-button', customizePrefixCls);
//       return <AntdDropdown.Button {...restProps} prefixCls={prefixCls} />;
//     }}
//   </ConfigConsumer>
// );

export default Dropdown;
