36 lines
774 B
TypeScript
36 lines
774 B
TypeScript
import { Typography } from "@mui/material";
|
|
import React, { PropsWithChildren } from "react";
|
|
|
|
export function SolarEnergyRouteContainer(
|
|
p: {
|
|
label: string;
|
|
homeWidget?: boolean;
|
|
actions?: React.ReactElement;
|
|
} & PropsWithChildren
|
|
): React.ReactElement {
|
|
return (
|
|
<div
|
|
style={{
|
|
margin: p.homeWidget ? "0px" : "50px",
|
|
flex: 1,
|
|
maxWidth: "1300px",
|
|
}}
|
|
>
|
|
<div
|
|
style={{
|
|
display: "flex",
|
|
justifyContent: "space-between",
|
|
alignItems: "center",
|
|
marginBottom: "20px",
|
|
flex: 1,
|
|
}}
|
|
>
|
|
<Typography variant={p.homeWidget ? "h6" : "h4"}>{p.label}</Typography>
|
|
{p.actions ?? <></>}
|
|
</div>
|
|
|
|
{p.children}
|
|
</div>
|
|
);
|
|
}
|