Rev 1477 | Rev 1479 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
import React from 'react'import { Container, styled } from '@mui/material'import { Add } from '@mui/icons-material'const Headery = styled(Container)(({ theme }) => ({display: 'flex',alignItems: 'center',justifyContent: 'center',position: 'relative',h1: {fontSize: '1.1rem',fontWeight: 'bold'},button: {display: 'flex',alignItems: 'center',gap: '0.5rem',position: 'relative',fontWeight: '600'},[theme.breakpoints.down('md')]: {justifyContent: 'space-between',button: {position: 'absolute',right: 0,top: '50%',transform: 'translateY(-50%)'}}}))const TitleSection = ({ onAdd, addLabel = '', title = '', ...rest }) => {return (<Headery {...rest}><h1>{title}</h1>{onAdd && (<button onClick={onAdd}><Add />{addLabel}</button>)}</Headery>)}export default TitleSection