import type { CSSProperties, MouseEvent, ReactNode } from 'react'; import type { TanStackRowData, TanStackTableColumn } from './types.ts'; interface CreateActionColumnOptions { onClick: (row: TData, event?: MouseEvent) => void; icon: ReactNode; style?: CSSProperties; id?: string; } export function createActionColumn( options: CreateActionColumnOptions, ): TanStackTableColumn { const { onClick, icon, style = {}, id } = options; return { id, header: '', meta: { style: { width: '1%', maxWidth: '20px', minWidth: '20px', padding: '0px', textAlign: 'center', ...style, }, }, cell: ({ row }) => ( ), }; }