import { memo } from 'react' type PromptMenuItemMenuItemProps = { icon: JSX.Element title: string disabled?: boolean isSelected: boolean onClick: () => void onMouseEnter: () => void setRefElement?: (element: HTMLDivElement) => void } export const PromptMenuItem = memo(({ icon, title, disabled, isSelected, onClick, onMouseEnter, setRefElement, }: PromptMenuItemMenuItemProps) => { return (
{ if (disabled) return onMouseEnter() }} onClick={() => { if (disabled) return onClick() }}> {icon}
{title}
) }) PromptMenuItem.displayName = 'PromptMenuItem'