-
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
기본 질문 리스트 #123
기본 질문 리스트 #123
Conversation
Deploying with Cloudflare Pages
|
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #123 +/- ##
==========================================
- Coverage 95.90% 94.01% -1.89%
==========================================
Files 39 37 -2
Lines 244 234 -10
Branches 41 41
==========================================
- Hits 234 220 -14
- Misses 10 14 +4
☔ View full report in Codecov by Sentry. |
Bundle SizesCompared against fffae88 Route: No significant changes found Dynamic import: None found. |
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.
👍 👍 고생하셨습니다
의견만 남겨봤어요!
const EditIcon = ({ size = 21, color = '#3D4350', ...rest }: ComponentProps<typeof Svg>) => { | ||
return ( | ||
<Svg size={size} isUsingFill {...rest}> | ||
<path | ||
fill-rule="evenodd" | ||
clip-rule="evenodd" | ||
d="M11.8787 1.70729C13.0034 0.582583 14.799 0.537595 15.9773 1.57233L16.1213 1.70729L19.2929 4.87887C20.4176 6.00358 20.4626 7.79914 19.4279 8.97752L19.2929 9.12151L8.29289 20.1215C7.77717 20.6372 7.09301 20.9458 6.36971 20.9936L6.17157 21.0002H3C1.40232 21.0002 0.0963391 19.7513 0.00509269 18.1765L0 18.0002V14.8286C0 14.0993 0.265587 13.3973 0.743204 12.852L0.87868 12.7073L11.8787 1.70729ZM3.499 12.9136L2.29289 14.1215C2.13661 14.2778 2.0374 14.4805 2.00867 14.6972L2 14.8286V18.0002C2 18.513 2.38604 18.9357 2.88338 18.9935L3 19.0002H6.17157C6.39259 19.0002 6.60606 18.927 6.7796 18.7941L6.87868 18.7073L8.085 17.4996L3.499 12.9136ZM14.7071 3.12151C14.3466 2.76102 13.7794 2.73329 13.3871 3.03832L13.2929 3.12151L4.914 11.4996L9.5 16.0856L17.8787 7.70729C18.2392 7.34681 18.2669 6.77958 17.9619 6.38729L17.8787 6.29308L14.7071 3.12151Z" | ||
fill="#3D4350" | ||
fill={color} |
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.
👍 👍 👍
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.
오 제가 빠트렸던 부분이네요!
감사합니다 ㅎㅎ
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.
👍 👍
const getType = (type: QuestionType, formType: QuestionFormType) => { | ||
if (formType === 'tendency') { | ||
return { | ||
tag: '기본정보', | ||
css: basicInformationCss, | ||
}; | ||
} | ||
if (type === 'short') { | ||
return { | ||
tag: '주관식', | ||
css: shortCss, | ||
}; | ||
} | ||
|
||
return { | ||
tag: '객관식', | ||
css: choiceCss, | ||
}; | ||
}; |
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.
오브젝트로 대체할 수 있지 않을거 같긴해요!
오브젝트로 한다면 tag와 css를 같이 반환하는 것이 아닌 한 번에 한 개씩 반환하는 방법도 나쁘지 않을 거 같기도 하구요 ...!
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.
오브젝트로 대체할 수 있지 않을거 같긴해요!
오브젝트로 한다면 tag와 css를 같이 반환하는 것이 아닌 한 번에 한 개씩 반환하는 방법도 나쁘지 않을 거 같기도 하구요 ...!
어떻게 대체할 수 있을까요?!
딱 떠오르는 방법이 없어서요 ㅜㅜ
혹시 예시가 있을까요?!
src/features/createSurvey/types.ts
Outdated
choices: { | ||
content: string; | ||
order: number; | ||
}[]; |
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.
요 부분은 interface Choice
를 만들어서
choices: Choice[]
이렇게 해도 괜찮을 거 같기도 해요!
border-radius: 10px; | ||
`; | ||
|
||
const basicInformationCss = (theme: Theme) => css` |
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.
오호 요런 방법으로 상태별 css 렌더링을 하는 방법도 있군용
저는 이렇게 해봤어요!
- 상태가 Boolean인 경우
<article css={QuestionWrapperCss(isSelected)}>
</article>
const QuestionWrapperCss = (isSelected: boolean) => css`
background-color: ${isSelected ? colors.primary_50 : colors.white};
`;
- 상태가 다양할 경우
const CollaborationBadge = ({ variant = 'default' }) => (
<div css={[BODY_2_REGULAR, collaborationBadgeCss(variant)]}>협업했던 팀원</div>
);
const styles: Record<string, Record<string, string>> = {
default: {
color: colors.white,
backgroundColor: colors.primary_200,
},
gray: {
color: colors.gray_500,
backgroundColor: colors.gray_100,
},
};
const collaborationBadgeCss = (variant: string) => css`
${styles[variant]}
`;
🤔 해결하려는 문제가 무엇인가요?
기본 질문 컴포넌트 생성
🎉 변경 사항
이곳은 꼭 봐주세요 🙏
🌄 스크린샷