From d6c1e7b3513a430bac871d1d4261973113bb5867 Mon Sep 17 00:00:00 2001 From: Alex Windett Date: Wed, 21 Dec 2016 14:49:41 +0000 Subject: [PATCH] Fixing missing avatar and adding toggled style to dropdown arrow in profile header --- frontend/src/components/header/index.js | 14 +++++++++++--- frontend/src/mock-state.json | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/header/index.js b/frontend/src/components/header/index.js index 050ebf28..14163c39 100644 --- a/frontend/src/components/header/index.js +++ b/frontend/src/components/header/index.js @@ -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 = ({ > - + - {account.name} + {account.name} diff --git a/frontend/src/mock-state.json b/frontend/src/mock-state.json index 04a0c729..effb919f 100644 --- a/frontend/src/mock-state.json +++ b/frontend/src/mock-state.json @@ -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