import {
cloneElement,
forwardRef,
HTMLAttributes,
PropsWithChildren,
ReactElement,
} from 'react';
import { StyledMenuItem, StyledArrow } from './styles';
export type IconMenuProps = PropsWithChildren<{
isDir?: boolean;
icon?: ReactElement;
}> &
HTMLAttributes;
export const MenuItem = forwardRef(
({ isDir = false, icon, children, ...props }, ref) => {
return (
{icon &&
cloneElement(icon, {
width: 16,
height: 16,
style: {
marginRight: 14,
},
})}
{children}
{isDir ? : null}
);
}
);
MenuItem.displayName = 'MenuItem';
export default MenuItem;