Farmbot-Web-App/frontend/ui/page.tsx

18 lines
434 B
TypeScript
Raw Normal View History

2017-06-29 12:54:02 -06:00
import * as React from "react";
2018-04-02 09:23:09 -06:00
import { ErrorBoundary } from "../error_boundary";
2017-06-29 12:54:02 -06:00
interface PageProps {
2018-03-19 08:16:04 -06:00
children?: React.ReactNode;
2017-06-29 12:54:02 -06:00
className?: string;
}
export function Page(props: PageProps) {
let finalClassName = "all-content-wrapper";
if (props.className) { finalClassName += ` ${props.className}`; }
2017-08-28 05:44:37 -06:00
return <div className={finalClassName}>
2018-04-02 09:23:09 -06:00
<ErrorBoundary>
{props.children}
</ErrorBoundary>
2017-08-28 05:44:37 -06:00
</div>;
2017-06-29 12:54:02 -06:00
}