mirror of
https://github.com/grafana/grafana.git
synced 2025-02-20 11:48:34 -06:00
17 lines
419 B
TypeScript
17 lines
419 B
TypeScript
// Libraries
|
|
import React, { FC } from 'react';
|
|
|
|
import PageLoader from '../PageLoader/PageLoader';
|
|
|
|
interface Props {
|
|
isLoading?: boolean;
|
|
children: React.ReactNode;
|
|
className?: string;
|
|
}
|
|
|
|
export const PageContents: FC<Props> = ({ isLoading, children, className }) => {
|
|
let content = className ? <div className={className}>{children}</div> : children;
|
|
|
|
return <>{isLoading ? <PageLoader /> : content}</>;
|
|
};
|