Refactor PaperTitle component to use Box component from Material-UI
parent
799d95ab23
commit
89514653ce
|
@ -1,22 +1,20 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import { Typography } from "@mui/material";
|
import { Typography, Box } from "@mui/material";
|
||||||
import { makeStyles } from "@mui/material/styles";
|
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const styles = {
|
||||||
paper: {
|
paper: {
|
||||||
margin: theme.spacing(1)
|
margin: 1
|
||||||
}
|
}
|
||||||
}));
|
};
|
||||||
|
|
||||||
const PaperTitle = ({ text }) => {
|
const PaperTitle = ({ text }) => {
|
||||||
const classes = useStyles();
|
|
||||||
return (
|
return (
|
||||||
<div className={classes.paper}>
|
<Box sx={styles.paper}>
|
||||||
<Typography variant="h5" gutterBottom>
|
<Typography variant="h5" gutterBottom>
|
||||||
{text}
|
{text}
|
||||||
</Typography>
|
</Typography>
|
||||||
</div>
|
</Box>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue