mirror of
https://github.com/yldio/copilot.git
synced 2024-11-11 05:40:11 +02:00
Fixing missing avatar and adding toggled style to dropdown arrow in profile header
This commit is contained in:
parent
36f14ba3a2
commit
d6c1e7b351
@ -62,7 +62,7 @@ const StyledAvatarWrapper = styled.div`
|
|||||||
&:after {
|
&:after {
|
||||||
border-left: 5px solid transparent;
|
border-left: 5px solid transparent;
|
||||||
border-right: 5px solid transparent;
|
border-right: 5px solid transparent;
|
||||||
border-top: 5px solid black;
|
border-${props => props.toggled ? 'bottom' : 'top'}: 5px solid black;
|
||||||
|
|
||||||
${pseudoEl({
|
${pseudoEl({
|
||||||
top: '50%',
|
top: '50%',
|
||||||
@ -77,6 +77,11 @@ const StyledTooltipWrapper = styled.div`
|
|||||||
bottom: -180px;
|
bottom: -180px;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
const StyledName = styled.span`
|
||||||
|
position: relative;
|
||||||
|
top: -12px;
|
||||||
|
`;
|
||||||
|
|
||||||
const arrowPosition = {
|
const arrowPosition = {
|
||||||
bottom: '100%',
|
bottom: '100%',
|
||||||
right: '10%'
|
right: '10%'
|
||||||
@ -110,16 +115,19 @@ const Header = ({
|
|||||||
>
|
>
|
||||||
<StyledProfileWrapper>
|
<StyledProfileWrapper>
|
||||||
|
|
||||||
<StyledAvatarWrapper>
|
<StyledAvatarWrapper toggled={accountUI.profile_tooltip}>
|
||||||
<Link
|
<Link
|
||||||
onClick={handleToggle}
|
onClick={handleToggle}
|
||||||
to='/'
|
to='/'
|
||||||
>
|
>
|
||||||
<span>{account.name}</span>
|
<StyledName>{account.name}</StyledName>
|
||||||
<Avatar
|
<Avatar
|
||||||
alt={account.name}
|
alt={account.name}
|
||||||
name={account.name}
|
name={account.name}
|
||||||
src={account.avatar}
|
src={account.avatar}
|
||||||
|
style={{
|
||||||
|
marginLeft: '12px'
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</Link>
|
</Link>
|
||||||
</StyledAvatarWrapper>
|
</StyledAvatarWrapper>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
"id": "nicola",
|
"id": "nicola",
|
||||||
"name": "Nicola",
|
"name": "Nicola",
|
||||||
"email": "nicola@biztech.com",
|
"email": "nicola@biztech.com",
|
||||||
"avatar": "./resources/avatar.png"
|
"avatar": "/src/resources/avatar.png"
|
||||||
},
|
},
|
||||||
"ui": {
|
"ui": {
|
||||||
"profile_tooltip": false
|
"profile_tooltip": false
|
||||||
|
Loading…
Reference in New Issue
Block a user