Skip to content

Commit

Permalink
feat: add extension recommendations (#81)
Browse files Browse the repository at this point in the history
* feat: add extensions recommendations

* fix: apply vscode-styled-components extensions

* fix: `setToastAnimation` 호출 수정

- `animation:` 이 함수 반환값으로 들어가니까 여기선 없어야 함

---------

Co-authored-by: nijuy <[email protected]>
  • Loading branch information
Hanna922 and nijuy authored May 5, 2024
1 parent 58a90c6 commit 4f4b461
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"recommendations": [
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"jpoissonnier.vscode-styled-components"
]
}
12 changes: 7 additions & 5 deletions src/components/Toast/Toast.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,15 @@ const setToastAnimation = ($duration: ToastDuration) => {
switch ($duration) {
case 'short':
return css`
${ToastFadeIn} ${FADE_DURATION}s ease-in forwards,
${ToastFadeOut} ${FADE_DURATION}s ${SHORT_DURATION + FADE_DURATION}s ease-out forwards
animation:
${ToastFadeIn} ${FADE_DURATION}s ease-in forwards,
${ToastFadeOut} ${FADE_DURATION}s ${SHORT_DURATION + FADE_DURATION}s ease-out forwards;
`;
case 'long':
return css`
${ToastFadeIn} ${FADE_DURATION}s ease-in forwards,
${ToastFadeOut} ${FADE_DURATION}s ${LONG_DURATION + FADE_DURATION}s ease-out forwards
animation:
${ToastFadeIn} ${FADE_DURATION}s ease-in forwards,
${ToastFadeOut} ${FADE_DURATION}s ${LONG_DURATION + FADE_DURATION}s ease-out forwards;
`;
}
};
Expand All @@ -55,5 +57,5 @@ export const StyledToast = styled.div<StyledToastProps>`
color: ${({ theme }) => theme.color.textBright};
${({ theme }) => theme.typo.body2};
animation: ${({ $duration }) => setToastAnimation($duration)};
${({ $duration }) => setToastAnimation($duration)};
`;

0 comments on commit 4f4b461

Please sign in to comment.