VirtWeb/virtweb_frontend/src/widgets/VirtWebPaper.tsx

19 lines
493 B
TypeScript
Raw Normal View History

2023-09-05 11:19:25 +00:00
import { Paper, Typography } from "@mui/material";
2023-09-08 10:23:15 +00:00
import React, { PropsWithChildren } from "react";
2023-09-05 11:19:25 +00:00
export function VirtWebPaper(
2023-09-08 10:23:15 +00:00
p: { label: string | React.ReactElement } & PropsWithChildren
2023-09-05 11:19:25 +00:00
): React.ReactElement {
return (
2023-09-05 14:12:20 +00:00
<Paper elevation={2} style={{ padding: "10px", margin: "20px" }}>
2023-09-05 11:19:25 +00:00
<Typography
variant="subtitle1"
style={{ marginBottom: "10px", fontWeight: "bold" }}
>
{p.label}
</Typography>
{p.children}
</Paper>
);
}