Refactor PaperTitle component to use Box component from Material-UI
parent
799d95ab23
commit
89514653ce
|
@ -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>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue