Rev 3460 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
import React from 'react';
import { Typography, Button, Box } from '@mui/material';
import AddIcon from '@mui/icons-material/Add';
export function PageHeader({ title, onAdd, labelAdd }) {
return (
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', mb: 2 }}>
<Typography variant='h5'>{title}</Typography>
{onAdd && (
<Button variant='contained' startIcon={<AddIcon />} onClick={onAdd}>
{labelAdd}
</Button>
)}
</Box>
);
}