mirror of
https://github.com/grafana/grafana.git
synced 2025-01-16 11:42:35 -06:00
26 lines
491 B
TypeScript
26 lines
491 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;
|