mirror of
https://github.com/grafana/grafana.git
synced 2025-08-03 05:37:53 +08:00
21 lines
452 B
TypeScript
21 lines
452 B
TypeScript
// Libraries
|
|
import React, { Component } from 'react';
|
|
|
|
// Components
|
|
import PageLoader from '../PageLoader/PageLoader';
|
|
|
|
interface Props {
|
|
isLoading?: boolean;
|
|
children: JSX.Element[] | JSX.Element;
|
|
}
|
|
|
|
class PageContents extends Component<Props> {
|
|
render() {
|
|
const { isLoading } = this.props;
|
|
|
|
return <div className="page-container page-body">{isLoading ? <PageLoader /> : this.props.children}</div>;
|
|
}
|
|
}
|
|
|
|
export default PageContents;
|