-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
스터디 피드백 컴포넌트를 제작한다 #128
Open
wooooooood
wants to merge
7
commits into
witherview:develop
Choose a base branch
from
wooooooood:feedback-comp
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
스터디 피드백 컴포넌트를 제작한다 #128
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
1df7815
feat: 🎸 연습 영상에서 피드백한 시간을 나타내는 컴포넌트를 추가한다
wooooooood 9947f17
feat: 🎸 연습 영상에서 피드백 일시를 나타내는 컴포넌트를 추가한다
wooooooood 84be789
feat: 🎸 연습 영상 피드백 종합결과를 나타내는 푸터 컴포넌트를 추가한다
wooooooood a4e6445
fix: 🐛 오타를 수정한다
wooooooood 23824f4
feat: 🎸 연습내역 피드백 컴포넌트를 추가한다
wooooooood 19949e6
refactor: 💡 css보완 및 코드를 정리한다
wooooooood dfda681
refactor: 💡 푸터 css를 수정한다
wooooooood File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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,21 @@ | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
import moment from 'moment'; | ||
|
||
const Wrapper = styled.label` | ||
font-size: 1.5vh; | ||
text-align: left; | ||
font-family: AppleSDGothicNeoM00; | ||
color: #d3d3d3; | ||
`; | ||
export default function DateTime({ dateTime }) { | ||
return <Wrapper>{moment(dateTime).format('M월 D일 A HH:mm')}</Wrapper>; | ||
} | ||
|
||
DateTime.propTypes = { | ||
dateTime: Date, | ||
}; | ||
|
||
DateTime.defaultProps = { | ||
dateTime: new Date(), | ||
}; |
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,9 @@ | ||
import React from 'react'; | ||
import DateTime from './DateTime'; | ||
|
||
export default { | ||
title: 'Atoms/DateTime', | ||
component: DateTime, | ||
}; | ||
|
||
export const dateTime = (args) => <DateTime {...args} />; |
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 @@ | ||
export { default } from './DateTime'; |
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,25 @@ | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
import { commonStyles } from '@style'; | ||
import PropTypes from 'prop-types'; | ||
import moment from 'moment'; | ||
|
||
const Wrapper = styled.label` | ||
font-family: TitilliumWebBold; | ||
font-size: 2vh; | ||
color: ${commonStyles.colors.cornflower}; | ||
align-items: center; | ||
display: flex; | ||
height: 100%; | ||
`; | ||
export default function FeedbackTime({ time }) { | ||
return <Wrapper>{moment(time, 'HH:mm:ss').format('m:ss')}</Wrapper>; | ||
} | ||
|
||
FeedbackTime.propTypes = { | ||
time: PropTypes.string, | ||
}; | ||
|
||
FeedbackTime.defaultProps = { | ||
time: '0:2:34', | ||
}; |
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,9 @@ | ||
import React from 'react'; | ||
import FeedbackTime from './FeedbackTime'; | ||
|
||
export default { | ||
title: 'Atoms/Feedback Time', | ||
component: FeedbackTime, | ||
}; | ||
|
||
export const feedbackTime = (args) => <FeedbackTime {...args} />; |
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 @@ | ||
export { default } from './FeedbackTime'; |
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
238 changes: 238 additions & 0 deletions
238
src/components/organisms/FeedbackContainer/FeedbackContainer.js
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,238 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import styled from 'styled-components'; | ||
import profileExample from '@assets/images/profile_example.png'; | ||
import A from '@atoms'; | ||
import { commonStyles } from '@style'; | ||
|
||
const Wrapper = styled.div` | ||
position: relative; | ||
width: 117.8vh; | ||
height: 67.1vh; | ||
box-shadow: 0 0.6vh 2.4vh 0 rgba(4, 4, 161, 0.1); | ||
background-color: #ffffff; | ||
border-radius: 1vh; | ||
|
||
div.feedback-container-header { | ||
box-shadow: 0 0.5vh 1vh 0 rgba(4, 4, 161, 0.1); | ||
padding: 2.8vh 5.6vh 2.7vh; | ||
display: flex; | ||
border-radius: 1vh 1vh 0 0; | ||
} | ||
div.profile-info-container { | ||
font-family: AppleSDGothicNeoB00; | ||
font-size: 2.4vh; | ||
padding-left: 3vh; | ||
user-select: none; | ||
color: #000000; | ||
line-height: 1.4; | ||
} | ||
div.feedback-list { | ||
padding: 2.7vh 5.6vh; | ||
overflow: auto; | ||
position: relative; | ||
height: calc(44.2vh - 5.4vh); | ||
} | ||
div.gradient { | ||
background-image: linear-gradient( | ||
to bottom, | ||
rgba(255, 255, 255, 0) 0%, | ||
rgba(255, 255, 255, 1) 84% | ||
); | ||
height: 6.2vh; | ||
width: calc(100% - 14px); | ||
} | ||
div.item { | ||
display: flex; | ||
margin-bottom: 3vh; | ||
} | ||
div.item-time { | ||
width: 9vh; | ||
} | ||
div.item-text { | ||
font-family: AppleSDGothicNeoM00; | ||
font-size: 2vh; | ||
line-height: 1.3; | ||
color: ${commonStyles.colors.greyishBrown}; | ||
} | ||
div.feedback-container-footer { | ||
position: absolute; | ||
bottom: 0; | ||
} | ||
div.footer-contents { | ||
width: calc(117.8vh - 11.2vh); | ||
height: 11.5vh; | ||
background-color: ${commonStyles.colors.paleLilac}; | ||
display: flex; | ||
align-items: center; | ||
padding: 0 5.6vh; | ||
justify-content: space-between; | ||
border-radius: 0 0 1vh 1vh; | ||
} | ||
p.description { | ||
font-family: AppleSDGothicNeoB00; | ||
font-size: 1.8vh; | ||
text-align: left; | ||
color: ${commonStyles.colors.cornflower}; | ||
} | ||
|
||
div.label { | ||
font-family: AppleSDGothicNeoB00; | ||
font-size: 2vh; | ||
color: #3d3d3d; | ||
display: flex; | ||
} | ||
|
||
div.custom-margin { | ||
margin-right: 7vh; | ||
} | ||
|
||
span.score { | ||
font-family: TitilliumWebBold; | ||
vertical-align: sub; | ||
font-size: 4vh; | ||
padding: 0 1vh 0 2.6vh; | ||
color: ${commonStyles.colors.darkIndigo}; | ||
} | ||
|
||
div.is-passed { | ||
border-radius: 1vh; | ||
background-color: ${commonStyles.colors.cornflower}; | ||
display: inline-flex; | ||
width: 11.8vh; | ||
height: 4vh; | ||
font-family: AppleSDGothicNeoM00; | ||
font-size: 2vh; | ||
text-align: center; | ||
color: #ffffff; | ||
justify-content: center; | ||
vertical-align: middle; | ||
align-items: center; | ||
margin-left: 2.5vh; | ||
} | ||
`; | ||
|
||
export default function FeedbackContainer({ | ||
name, | ||
dateTime, | ||
src, | ||
score, | ||
itemList, | ||
}) { | ||
const isPassed = true; // TODO: 기준 설정 필요 | ||
return ( | ||
<Wrapper> | ||
<div className="feedback-container-header"> | ||
<A.ProfileIcon src={src} isSmall /> | ||
<div className="profile-info-container"> | ||
<div>{name}님의 피드백</div> | ||
<A.DateTime dateTime={dateTime} /> | ||
</div> | ||
</div> | ||
<div className="feedback-list"> | ||
{itemList.map((item) => ( | ||
<div className="item"> | ||
<div className="item-time"> | ||
<A.FeedbackTime time={item.feedbackTime} /> | ||
</div> | ||
<div className="item-text">{item.text}</div> | ||
</div> | ||
))} | ||
</div> | ||
<div className="feedback-container-footer"> | ||
<div className="gradient" /> | ||
<div className="footer-contents"> | ||
<p className="description"> | ||
면접 점수와 합격 유무 기준은 상대방의 주관적 평가입니다. | ||
</p> | ||
<div className="label"> | ||
<div className="custom-margin"> | ||
<div> | ||
현재 면접 점수 <span className="score">{score}</span>점 | ||
</div> | ||
</div> | ||
<div> | ||
합격 유무 | ||
<div className="is-passed">{isPassed ? '합격' : '불합격'}</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</Wrapper> | ||
); | ||
} | ||
|
||
FeedbackContainer.propTypes = { | ||
name: PropTypes.string, | ||
dateTime: Date, | ||
src: PropTypes.string, | ||
score: PropTypes.number, | ||
itemList: PropTypes.arrayOf( | ||
PropTypes.shape({ | ||
feedbackTime: PropTypes.string, | ||
text: PropTypes.string, | ||
}), | ||
), | ||
}; | ||
|
||
FeedbackContainer.defaultProps = { | ||
name: '홍길동', | ||
dateTime: new Date(), | ||
src: profileExample, | ||
score: 8, | ||
itemList: [ | ||
{ | ||
feedbackTime: '0:2:25', | ||
text: '자기소개 파트에서 자신감 있게 말하는 부분 좋았습니다.', | ||
}, | ||
{ | ||
feedbackTime: '0:8:11', | ||
text: | ||
'물론 화상면접이긴 하지만.. 카메라를 너무 안보시는 것 같아요. 그게 조금 아쉽네요.', | ||
}, | ||
{ | ||
feedbackTime: '0:9:37', | ||
text: '지원동기에서 직무 강점을 말하면 더 좋을 것 같아요.', | ||
}, | ||
{ | ||
feedbackTime: '0:9:44', | ||
text: | ||
'본인의 장점 같은 경우에는 밝다 말고 다른 것도 생각해 보면 좋을 것 같아요. 중간중간 미소는 좋네요~^^', | ||
}, | ||
{ | ||
feedbackTime: '0:10:01', | ||
text: '문장은 최대한 간결하고 딱딱 떨어지게 말씀 해주세요^^', | ||
}, | ||
{ | ||
feedbackTime: '0:9:37', | ||
text: '지원동기에서 직무 강점을 말하면 더 좋을 것 같아요.', | ||
}, | ||
{ | ||
feedbackTime: '0:9:44', | ||
text: | ||
'본인의 장점 같은 경우에는 밝다 말고 다른 것도 생각해 보면 좋을 것 같아요. 중간중간 미소는 좋네요~^^', | ||
}, | ||
{ | ||
feedbackTime: '0:10:01', | ||
text: '문장은 최대한 간결하고 딱딱 떨어지게 말씀 해주세요^^', | ||
}, | ||
{ | ||
feedbackTime: '0:2:25', | ||
text: '자기소개 파트에서 자신감 있게 말하는 부분 좋았습니다.', | ||
}, | ||
{ | ||
feedbackTime: '0:8:11', | ||
text: | ||
'물론 화상면접이긴 하지만.. 카메라를 너무 안보시는 것 같아요. 그게 조금 아쉽네요.', | ||
}, | ||
{ | ||
feedbackTime: '0:9:37', | ||
text: '지원동기에서 직무 강점을 말하면 더 좋을 것 같아요.', | ||
}, | ||
{ | ||
feedbackTime: '0:9:44', | ||
text: | ||
'본인의 장점 같은 경우에는 밝다 말고 다른 것도 생각해 보면 좋을 것 같아요. 중간중간 미소는 좋네요~^^', | ||
}, | ||
], | ||
}; |
21 changes: 21 additions & 0 deletions
21
src/components/organisms/FeedbackContainer/FeedbackContainer.stories.js
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,21 @@ | ||
/* eslint-disable react/jsx-props-no-spreading */ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import FeedbackContainer from './index'; | ||
|
||
export default { | ||
title: 'Organisms/Feedback Container', | ||
description: '프로필 사진, 이름, 참여율', | ||
}; | ||
|
||
const profileImage = | ||
'https://avatars2.githubusercontent.com/u/16266103?s=460&u=46ab2774d38212f0d0050592ce02dbcf36a7a97a&v=4'; | ||
|
||
export const feedbackContainer = ({ src = profileImage, name = '아무개' }) => ( | ||
<FeedbackContainer src={src} name={name} /> | ||
); | ||
|
||
feedbackContainer.propTypes = { | ||
src: PropTypes.string, | ||
name: PropTypes.string, | ||
}; |
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 @@ | ||
export { default } from './FeedbackContainer'; |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
단위를 vh로 바꿔주시면 좋을 것 같아요!