update UserHeader

This commit is contained in:
Ruidy Nemausat 2020-04-03 13:11:57 +02:00
parent 9e0a2f0d47
commit 70d1df1e05

View file

@ -1,21 +1,34 @@
import React, { FC } from "react"; import React, { FC } from "react";
import { Header } from "../components/Header"; import { Header } from "../components/Header";
import { UserAvatar } from "./UserAvatar"; import { UserAvatar } from "./UserAvatar";
import { Grid, makeStyles, createStyles, Theme } from "@material-ui/core";
import classes from "*.module.css";
interface IProps { interface IProps {
fullName: string; fullName: string;
presentation: string; presentation: string;
picture: string; picture: string;
} }
const useStyles = makeStyles((theme: Theme) => ({
root: {
margin: theme.spacing(1),
flexGrow: 1
}
}));
export const UserHeader: FC<IProps> = ({ fullName, presentation, picture }) => { export const UserHeader: FC<IProps> = ({ fullName, presentation, picture }) => {
const classes = useStyles();
return ( return (
<div className="row valign-wrapper"> <div className={classes.root}>
<div className="col s2"> <Grid container>
<UserAvatar picture={picture} alt="" /> <Grid item xs={2}>
</div> <UserAvatar picture={picture} alt="" />
<div className="col s10"> </Grid>
<Header title={fullName} description={presentation} /> <Grid item xs>
</div> <Header title={fullName} description={presentation} />
</Grid>
</Grid>
</div> </div>
); );
}; };