Files
dashfront/src/components/PageLayout.jsx
2026-08-06 00:19:21 +02:00

24 lines
523 B
JavaScript

import Box from '@mui/material/Box';
import Typography from '@mui/material/Typography';
export default function PageLayout({
title,
showTitle = true,
titleAction,
children,
}) {
return (
<Box sx={{ minWidth: 0 }}>
{showTitle ? (
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1.5, mb: 2 }}>
<Typography variant="h5" sx={{ fontWeight: 700 }}>
{title}
</Typography>
{titleAction}
</Box>
) : null}
{children}
</Box>
);
}