Skip to content

Commit

Permalink
chore: 헤더 프로필 우측에 화살표 추가
Browse files Browse the repository at this point in the history
해당 영역을 클릭하라는 인터렉션을 위해
헤더 프로필 우측에 화살표를 추가했습니다.
  • Loading branch information
hzoou committed Dec 22, 2019
1 parent 977e886 commit 171c695
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 3 deletions.
Binary file removed cocode/src/components/Common/UserProfile/avatar.jpeg
Binary file not shown.
4 changes: 4 additions & 0 deletions cocode/src/components/Common/UserProfile/down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion cocode/src/components/Common/UserProfile/index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
import React from 'react';
import * as Styled from './style';

import DropDownMenu from 'components/Common/DropDownMenu';
import down from './down.svg';

function UserProfile({ username, avatar, menuItems }) {
return (
<Styled.UserProfile>
<Styled.UserName>{username}</Styled.UserName>
<Styled.UserAvatar src={avatar} alt="프로필" />
<DropDownMenu menuItems={menuItems}>
<Styled.UserAvatar src={avatar} alt="프로필" />
<Styled.DownArrow src={down} />
</DropDownMenu>
</Styled.UserProfile>
);
Expand Down
17 changes: 15 additions & 2 deletions cocode/src/components/Common/UserProfile/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,21 @@ const UserAvatar = styled.img`
width: 3rem;
height: 3rem;
border-radius: 0.5rem;
cursor: pointer;
}
`;

export { UserProfile, UserName, UserAvatar };
const DownArrow = styled.img`
& {
width: 1rem;
height: 1rem;
margin: auto 0 auto 1rem;
cursor: pointer;
filter: invert(0.3);
}
&:hover {
filter: invert(0);
}
`;

export { UserProfile, UserName, UserAvatar, DownArrow };

0 comments on commit 171c695

Please sign in to comment.