grafana/public/app/core/components/PageLoader/PageLoader.tsx
Hugo Häggmark aaf93b2f77 Feature: Encapsulated dynamic imports with error boundary and suspense (#19128)
* Feature: Encapsulated dynamic imports with error boundary and suspense

* Refactor: Changes after PR review

* Align PageLoader and LoadingPlaceholder

* Updated loading failed UI abit

* Change Failed to Unable
2019-09-17 09:46:26 +02:00

18 lines
379 B
TypeScript

import React, { FC } from 'react';
import { LoadingPlaceholder } from '@grafana/ui';
interface Props {
pageName?: string;
}
const PageLoader: FC<Props> = ({ pageName = '' }) => {
const loadingText = `Loading ${pageName}...`;
return (
<div className="page-loader-wrapper">
<LoadingPlaceholder text={loadingText} />
</div>
);
};
export default PageLoader;