grafana/public/app/core/components/Page/PageContents.tsx
Ashley Harrison 4e492ae725
Navigation: Unify Page component (#66951)
* remove old page component

* add test to check initDashboard is only called once (prevent variables loading twice)

* add help node

* update unit tests

* remove last mentions of topnav

* fix unit tests

* remove unused props from ButtonRow interface

* remove prop from test
2023-04-24 16:41:32 +01:00

17 lines
407 B
TypeScript

// Libraries
import React from 'react';
import PageLoader from '../PageLoader/PageLoader';
interface Props {
isLoading?: boolean;
children: React.ReactNode;
className?: string;
}
export const PageContents = ({ isLoading, children, className }: Props) => {
let content = className ? <div className={className}>{children}</div> : children;
return <>{isLoading ? <PageLoader /> : content}</>;
};