import { ActionIcon, type ActionIconProps, Tooltip } from '@mantine/core'; import { type HTMLPropsRef, type MRT_RowData, type MRT_TableInstance, } from '../../types'; interface Props extends ActionIconProps, HTMLPropsRef { table: MRT_TableInstance; } export const MRT_ToggleFiltersButton = ({ table: { getState, options: { icons: { IconFilter, IconFilterOff }, localization: { showHideFilters }, }, setShowColumnFilters, }, title, ...rest }: Props) => { 'use no memo'; const { showColumnFilters } = getState(); return ( setShowColumnFilters((current) => !current)} size="lg" variant="subtle" {...rest} > {showColumnFilters ? : } ); };