mirror of https://github.com/grafana/grafana
parent
8fef2138b2
commit
7f4a479451
@ -0,0 +1,26 @@ |
||||
// Libraries
|
||||
import React, { Component } from 'react'; |
||||
|
||||
// Components
|
||||
import PageHeader from '../PageHeader/PageHeader'; |
||||
import PageContents from './PageContents'; |
||||
|
||||
interface Props { |
||||
title: string; |
||||
children: JSX.Element[] | JSX.Element; |
||||
} |
||||
|
||||
class Page extends Component<Props> { |
||||
static Header = PageHeader; |
||||
static Contents = PageContents; |
||||
|
||||
render() { |
||||
return ( |
||||
<div> |
||||
{this.props.children} |
||||
</div> |
||||
); |
||||
} |
||||
} |
||||
|
||||
export default Page; |
@ -0,0 +1,29 @@ |
||||
// Libraries
|
||||
import React, { Component } from 'react'; |
||||
|
||||
// Components
|
||||
import CustomScrollbar from '../CustomScrollbar/CustomScrollbar'; |
||||
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"> |
||||
<CustomScrollbar> |
||||
{isLoading && <PageLoader />} |
||||
{this.props.children} |
||||
</CustomScrollbar> |
||||
</div> |
||||
); |
||||
} |
||||
} |
||||
|
||||
export default PageContents; |
Loading…
Reference in new issue