Fixing missing avatar and adding toggled style to dropdown arrow in profile header

This commit is contained in:
Alex Windett 2016-12-21 14:49:41 +00:00
parent 36f14ba3a2
commit d6c1e7b351
2 changed files with 12 additions and 4 deletions

View File

@ -62,7 +62,7 @@ const StyledAvatarWrapper = styled.div`
&:after {
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-top: 5px solid black;
border-${props => props.toggled ? 'bottom' : 'top'}: 5px solid black;
${pseudoEl({
top: '50%',
@ -77,6 +77,11 @@ const StyledTooltipWrapper = styled.div`
bottom: -180px;
`;
const StyledName = styled.span`
position: relative;
top: -12px;
`;
const arrowPosition = {
bottom: '100%',
right: '10%'
@ -110,16 +115,19 @@ const Header = ({
>
<StyledProfileWrapper>
<StyledAvatarWrapper>
<StyledAvatarWrapper toggled={accountUI.profile_tooltip}>
<Link
onClick={handleToggle}
to='/'
>
<span>{account.name}</span>
<StyledName>{account.name}</StyledName>
<Avatar
alt={account.name}
name={account.name}
src={account.avatar}
style={{
marginLeft: '12px'
}}
/>
</Link>
</StyledAvatarWrapper>

View File

@ -5,7 +5,7 @@
"id": "nicola",
"name": "Nicola",
"email": "nicola@biztech.com",
"avatar": "./resources/avatar.png"
"avatar": "/src/resources/avatar.png"
},
"ui": {
"profile_tooltip": false