2023-11-15 11:13:53 +00:00
|
|
|
import { useIntl, defineMessages } from 'react-intl';
|
|
|
|
|
2023-06-13 17:26:25 +00:00
|
|
|
import { CircularProgress } from './circular_progress';
|
|
|
|
|
2023-11-15 11:13:53 +00:00
|
|
|
const messages = defineMessages({
|
|
|
|
loading: { id: 'loading_indicator.label', defaultMessage: 'Loading…' },
|
|
|
|
});
|
|
|
|
|
|
|
|
export const LoadingIndicator: React.FC = () => {
|
|
|
|
const intl = useIntl();
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div
|
|
|
|
className='loading-indicator'
|
|
|
|
role='progressbar'
|
|
|
|
aria-busy
|
|
|
|
aria-live='polite'
|
|
|
|
aria-label={intl.formatMessage(messages.loading)}
|
|
|
|
>
|
|
|
|
<CircularProgress size={50} strokeWidth={6} />
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
};
|