/* eslint-disable react/static-property-placement */ /* eslint-env browser */ import React, { FC } from 'react'; type Props = { className?: string; children: React.JSX.Element | null; loaded: boolean; height?: string; init?: '' | 'table' | 'box'; } const AUSpinnerComponent: FC = ({ loaded, init = '', height = 'auto', className = '', children, }) => { let classNames = 'processing-state'; if (init === 'table' || init === 'box') { classNames = `${classNames} processing-state--init-${init}`; } if (className) { classNames = `${classNames} ${className}`; } if (!loaded) { return (
); } return children; }; AUSpinnerComponent.displayName = 'AUSpinnerComponent'; export default AUSpinnerComponent;