import Collapse from '@mui/material/Collapse'; import LinearProgress, { type LinearProgressProps, } from '@mui/material/LinearProgress'; import { type MRT_RowData, type MRT_TableInstance } from '../../types'; import { parseFromValuesOrFunc } from '../../utils/utils'; export interface MRT_LinearProgressBarProps extends LinearProgressProps { isTopToolbar: boolean; table: MRT_TableInstance; } export const MRT_LinearProgressBar = ({ isTopToolbar, table, ...rest }: MRT_LinearProgressBarProps) => { const { getState, options: { muiLinearProgressProps }, } = table; const { isSaving, showProgressBars } = getState(); const linearProgressProps = { ...parseFromValuesOrFunc(muiLinearProgressProps, { isTopToolbar, table, }), ...rest, }; return ( ); };