@cimpress/react-components
Version:
React components to support the MCP styleguide
23 lines • 764 B
JavaScript
import React from 'react';
import { Spinner } from '../Spinner';
const defaultNoDataText = 'Loading...';
export const TableSpinner = ({ loading, loadingText, entireHeaderHeight = 0 }) => {
if (!loading) {
return null;
}
return (React.createElement("div", { style: {
position: 'absolute',
left: 0,
top: entireHeaderHeight,
bottom: 0,
width: '100%',
backgroundColor: 'rgba(255,255,255,0.8)',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
} },
React.createElement(Spinner, null),
loadingText || defaultNoDataText));
};
//# sourceMappingURL=TableSpinner.js.map