styling(AppTitle & AppContent): Misc changes

- Fixes annoying AppContent whitespace on border
- Better styles AppTitle
This commit is contained in:
Taso committed 2020-11-18 13:09:06 -05:00
1 parent 4f9b617854
commit 79669c1710
2 files changed
+7 -6

No files matched your search

+5 -4
View File
@@ -18,7 +18,7 @@ const useStyle = makeStyles(
(theme): IUseStyle => ({
root: ({ backgroundColor }) => ({
width: "100%",
textAlign: "center",
textAlign: "left",
backgroundColor: backgroundColor || theme.palette.background.default,
}),
text: ({ color }) => ({
@@ -26,16 +26,17 @@ const useStyle = makeStyles(
}),
})
);
// Taso: Maybe we should pass an icon (maybe fa?) as a prop as well at somepoint
// but need to think about the best way to do that for standardization sake.
export const AppTitle = ({
app: { backgroundColor, color, nameLocale },
variant = "h4",
variant = "h5",
...props
}: IProps) => {
const classes = useStyle({ color, backgroundColor });
const { t } = useTranslation();
return (
<Box px={2} pt={4} className={classes.root} {...props}>
<Box px={2} pt={2} className={classes.root} {...props}>
<Typography className={classes.text} paragraph variant={variant}>
{t(nameLocale)}
</Typography>