import React, { FC } from 'react';
import { Dropdown } from '../Dropdown';
import { Item } from './Item';
import * as sc from './styles';

type DropdownMenuProps = React.ComponentProps<typeof Dropdown>;

const DropdownMenuComponent: FC<DropdownMenuProps> = ({
  children,
  ...otherProps
}) => {
  return (
    <Dropdown {...otherProps}>
      <sc.Container gridGap={0}>{children}</sc.Container>
    </Dropdown>
  );
};

export const DropdownMenu = Object.assign(DropdownMenuComponent, {
  Item,
});
