kleckrelay/src/components/SimpleSection.tsx
2022-11-01 15:57:53 +01:00

22 lines
474 B
TypeScript

import {ReactElement, ReactNode} from "react"
import {Grid, Typography} from "@mui/material"
export interface SimpleSectionProps {
label: string
children: ReactNode
}
export default function SimpleSection({label, children}: SimpleSectionProps): ReactElement {
return (
<Grid container direction="column" spacing={1}>
<Grid item>
<Typography variant="h6" component="h2">
{label}
</Typography>
</Grid>
<Grid item>{children}</Grid>
</Grid>
)
}