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

18 lines
415 B
TypeScript
Raw Permalink Normal View History

2017-06-29 12:54:02 -06:00
import * as React from "react";
2019-12-26 13:20:10 -07:00
import { ErrorBoundary } from "../error_boundary";
2017-06-29 12:54:02 -06:00
interface WidgetProps {
children?: React.ReactNode;
2017-06-29 12:54:02 -06:00
className?: string;
}
export function Widget(props: WidgetProps) {
2017-07-03 14:59:36 -06:00
let className = `widget-wrapper `;
if (props.className) { className += props.className; }
2017-08-28 05:44:37 -06:00
return <div className={className}>
2019-12-26 13:20:10 -07:00
<ErrorBoundary>
{props.children}
</ErrorBoundary>
2017-08-28 05:44:37 -06:00
</div>;
2017-06-29 12:54:02 -06:00
}