working typescript version

This commit is contained in:
erik-sn committed 2020-10-07 12:19:55 -04:00
1 parent 581d6011e0
commit cff746aa38
119 files changed
+247 -189

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
import React from "react";
import { Typography, Box, makeStyles } from "@material-ui/core";
import { useTranslation } from "react-i18next";
const useStyle = makeStyles((theme) => ({
root: ({ backgroundColor }) => ({
width: "100%",
textAlign: "center",
backgroundColor: backgroundColor || theme.palette.background.default,
}),
text: ({ color }) => ({
color: color || theme.palette.text.primary,
}),
}));
export const AppTitle = ({
app: { backgroundColor, color, nameLocale },
variant = "h4",
...props
}) => {
const classes = useStyle({ color, backgroundColor });
const { t } = useTranslation();
return (
<Box px={2} pt={4} className={classes.root} {...props}>
<Typography className={classes.text} paragraph variant={variant}>
{t(nameLocale)}
</Typography>
</Box>
);
};