Refactor PaperTitle component to use Box component from Material-UI

master^2
Tudor Stanciu 2024-03-25 02:38:49 +02:00
parent 799d95ab23
commit 89514653ce
1 changed files with 6 additions and 8 deletions

View File

@ -1,22 +1,20 @@
import React from "react";
import PropTypes from "prop-types";
import { Typography } from "@mui/material";
import { makeStyles } from "@mui/material/styles";
import { Typography, Box } from "@mui/material";
const useStyles = makeStyles(theme => ({
const styles = {
paper: {
margin: theme.spacing(1)
margin: 1
}
}));
};
const PaperTitle = ({ text }) => {
const classes = useStyles();
return (
<div className={classes.paper}>
<Box sx={styles.paper}>
<Typography variant="h5" gutterBottom>
{text}
</Typography>
</div>
</Box>
);
};