import {type ActionIconProps, Button} from '@mantine/core'; import {type HTMLPropsRef, type MRT_TableInstance} from '../types'; import { Icon } from '@iconify/react'; interface Props = {}> extends ActionIconProps, HTMLPropsRef { table: MRT_TableInstance; } const sizes = ['xs', 'md', 'xl'] as const; export const MRT_ToggleDensePaddingButton = < TData extends Record = {}, >({table}: Props) => { const { getState, options: { localization, }, setDensity, } = table; const {density} = getState(); const handleToggleDensePadding = () => { setDensity(sizes[(sizes.indexOf(density) - 1) % sizes.length] ?? 'xl'); }; return ( {/**/} ); };