-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
💄 Design: Action Items 담당자 지정 창 퍼블리싱 (#173)
- Loading branch information
Showing
6 changed files
with
145 additions
and
2 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import * as S from '@/styles/writeRetroStyles/Members.styles'; | ||
|
||
interface UserListProps { | ||
users: { name: string; image: string }[]; | ||
onSelectUserImg: (image: string) => void; | ||
onSelectUserName: (name: string) => void; | ||
} | ||
|
||
export const Members: React.FC<UserListProps> = ({ users, onSelectUserImg, onSelectUserName }) => { | ||
const handleUserClick = (name: string, image: string) => { | ||
onSelectUserName(name); | ||
onSelectUserImg(image); | ||
}; | ||
|
||
return ( | ||
<> | ||
<S.ListConatiner> | ||
<S.TitleContainer> | ||
<S.Title>해당 업무의 담당자를 지정해주세요</S.Title> | ||
</S.TitleContainer> | ||
<ul> | ||
{users.map((user, index) => ( | ||
<S.ListItem key={index} onClick={() => handleUserClick(user.name, user.image)}> | ||
<S.ProfileImage src={user.image} /> <S.UserName>{user.name}</S.UserName> | ||
</S.ListItem> | ||
))} | ||
</ul> | ||
</S.ListConatiner> | ||
</> | ||
); | ||
}; | ||
export default Members; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import styled from 'styled-components'; | ||
|
||
export const ListConatiner = styled.div` | ||
position: absolute; | ||
z-index: 1; | ||
width: 280px; | ||
max-height: 350px; | ||
overflow-y: auto; | ||
border: 1px solid #c8c8c8; | ||
border-radius: 10px; | ||
background-color: #f4f4f4; | ||
`; | ||
|
||
export const Title = styled.span` | ||
color: #969696; | ||
`; | ||
|
||
export const TitleContainer = styled.div` | ||
background-color: #f0f0f0; | ||
border-top-right-radius: 10px; | ||
border-top-left-radius: 10px; | ||
border-bottom: 1px solid #e5e5e5; | ||
padding: 10px; | ||
`; | ||
|
||
export const ListBox = styled.ul``; | ||
|
||
export const ListItem = styled.li` | ||
list-style: none; | ||
display: flex; | ||
flex-direction: row; | ||
margin-top: 10px; | ||
margin-bottom: 10px; | ||
color: #969696; | ||
&:hover { | ||
cursor: pointer; | ||
} | ||
`; | ||
|
||
export const ProfileImage = styled.img` | ||
margin-left: 5px; | ||
margin-right: 5px; | ||
width: 30px; | ||
height: 30px; | ||
`; | ||
|
||
export const UserName = styled.span` | ||
padding-left: 10px; | ||
`; |