import { type MouseEvent } from 'react'; import { ActionIcon, Menu, Tooltip } from '@mantine/core'; import { type MRT_Row, type MRT_TableInstance } from '../types'; interface Props = {}> { handleEdit: (event: MouseEvent) => void; row: MRT_Row; table: MRT_TableInstance; } export const MRT_RowActionMenu = = {}>({ handleEdit, row, table, }: Props) => { const { options: { editDisplayMode, enableEditing, icons: { IconEdit, IconDots }, localization, positionActionsColumn, renderRowActionMenuItems, }, } = table; return ( event.stopPropagation()} size="sm" > event.stopPropagation()}> {enableEditing && editDisplayMode !== 'table' && ( } onClick={handleEdit}> {localization.edit} )} {renderRowActionMenuItems?.({ row, table, })} ); };