import Box from '@mui/material/Box'; import CircularProgress, { type CircularProgressProps, } from '@mui/material/CircularProgress'; import { alpha } from '@mui/material/styles'; import { type MRT_RowData, type MRT_TableInstance } from '../../types'; import { parseFromValuesOrFunc } from '../../utils/utils'; export interface MRT_TableLoadingOverlayProps extends CircularProgressProps { table: MRT_TableInstance; } export const MRT_TableLoadingOverlay = ({ table, ...rest }: MRT_TableLoadingOverlayProps) => { const { options: { id, localization, mrtTheme: { baseBackgroundColor }, muiCircularProgressProps, }, } = table; const circularProgressProps = { ...parseFromValuesOrFunc(muiCircularProgressProps, { table }), ...rest, }; return ( {circularProgressProps?.Component ?? ( )} ); };