import React, { ComponentProps } from 'react';

import { Popper } from '@/mui/components';

type PopperProps = ComponentProps<typeof Popper>;

function SpecialPopper({ children, style, className, ...props }: PopperProps) {
  return (
    <Popper
      {...props}
      style={{
        ...(style || {}),
        minWidth: style?.width,
        // eslint-disable-next-line local-rules/no-inline-styles
        maxWidth: 300,
        width: undefined,
      }}
    >
      {children}
    </Popper>
  );
}

export default SpecialPopper;
