import { FC, useState } from 'react'; import { Box, Button, ButtonBase } from '@mui/material'; import { UserIdentity } from '../../core/shareObject/types'; import { Card } from '../Card'; import ExpandMore from '@mui/icons-material/ExpandMore'; import AccountCircleIcon from '@mui/icons-material/AccountCircle'; type Props = { identity: UserIdentity; }; export const HeaderIdentityUserPopper: FC = ({ identity }) => { const [open, setOpen] = useState(false); // display: 'flex', // alignItems: 'center', // textDecoration: 'none', // padding: '.25em', // color: 'white', // justifyContent: 'center', const logout = () => { // TODO }; return ( <> setOpen(!open)} sx={{ color: 'white', background: open ? 'rgba(255,255,255,.2)' : undefined, textTransform: 'none', padding: 0, paddingLeft: 1, }} > {identity.fullName} {open && ( {identity.fullName} )} ); };