grafana/public/app/features/alerting/unified/components/AlertingPageWrapper.tsx
Torkel Ödegaard f6ecded86b
Theme: Page styles move to emotion global styles and design tweaks (#33529)
* Theme: Page styles move to emotion global styles and design tweaks

* More style tweaks

* tweaks

* Updating snapshots

* Another fix

* Another fix

* minor fix

* More style tweaks to page toolbar and alert rule page

* minor polish
2021-04-30 10:04:01 +02:00

24 lines
618 B
TypeScript

import React, { FC } from 'react';
import Page from 'app/core/components/Page/Page';
import { getNavModel } from 'app/core/selectors/navModel';
import { useSelector } from 'react-redux';
import { StoreState } from 'app/types/store';
interface Props {
pageId: string;
isLoading?: boolean;
}
export const AlertingPageWrapper: FC<Props> = ({ children, pageId, isLoading }) => {
const navModel = getNavModel(
useSelector((state: StoreState) => state.navIndex),
pageId
);
return (
<Page navModel={navModel}>
<Page.Contents isLoading={isLoading}>{children}</Page.Contents>
</Page>
);
};