import { ActionIcon, Flex, Tooltip } from '@mantine/core'; import { type MRT_Column, type MRT_TableInstance } from '../types'; import {Icon} from "@iconify/react"; interface Props = {}> { column: MRT_Column; table: MRT_TableInstance; } export const MRT_ColumnPinningButtons = < TData extends Record = {}, >({ column, table, }: Props) => { const { options: { localization, }, } = table; const handlePinColumn = (pinDirection: 'left' | 'right' | false) => { column.pin(pinDirection); }; return ( {column.getIsPinned() ? ( handlePinColumn(false)} size="md"> ) : ( <> handlePinColumn('left')} size="md"> handlePinColumn('right')} size="md"> )} ); };