Skip to content

Commit

Permalink
✨ 피드 숨기기 애니메이션 수정 및 최대 해상도 설정 (#82)
Browse files Browse the repository at this point in the history
* feat: 아이콘 분리
* feat: 숨기기 아이콘 애니메이션 추가
* feat: 화면 최대 해상도 설정
* feat: px 단위 적용

Closes #PW-355
  • Loading branch information
BangDori authored May 27, 2024
1 parent 3ef81c7 commit c4c73ef
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 12 deletions.
13 changes: 6 additions & 7 deletions public/assets/sprites/common.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions src/app/layout/RootLayout.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.wrap {
/** iPhone 15 Pro Max 430 x 932 */
max-width: 573.3px; // 430 pt
max-height: 1242.6px; // 932 pt

margin: 0 auto;
}
7 changes: 6 additions & 1 deletion src/app/layout/RootLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { Outlet } from 'react-router-dom';
import './RootLayout.scss';

export const RootLayout = () => {
return <Outlet />;
return (
<div className='wrap'>
<Outlet />
</div>
);
};
46 changes: 43 additions & 3 deletions src/features/feed-hides/ui/HiddenFeed.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
@keyframes revealCircle {
to {
transform: rotate(180deg);
}
}

@keyframes fadeInCompletion {
0% {
opacity: 0;
Expand All @@ -18,15 +24,49 @@
align-items: center;

.feed-hidden-checkmark {
margin: 1px;

position: relative;

display: flex;
justify-content: center;
align-items: center;
overflow: hidden;

width: 22px;
height: 22px;

width: 24px;
height: 24px;
border-radius: 50%;

/** Circle */
&::before {
position: absolute;
width: inherit;
height: inherit;
border-radius: 50%;
box-shadow: inset 0 0 0 1.5px #00d5e1;
content: '';
}

/** Circle screen */
.cover {
position: absolute;
width: 200%;
height: inherit;
transform-origin: 50% 0;
background: white;
animation: revealCircle 0.5s ease forwards;
}

/** Checkmark */
svg {
animation: fadeInCompletion 0.35s ease-in-out 0s forwards;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);

opacity: 0;
animation: fadeInCompletion 0.25s ease-in-out 0.5s forwards;
}
}

Expand Down
3 changes: 2 additions & 1 deletion src/features/feed-hides/ui/HiddenFeed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ export const HiddenFeed: React.FC<HiddenFeedProps> = ({ feedId, type }) => {
<div className='feed-hidden-wrapper'>
<div className='feed-hidden-container'>
<div className='feed-hidden-checkmark'>
<Icon name='check_mint' width='24' height='24' />
<div className='cover' />
<Icon name='check_mint' width='12' height='9' />
</div>
<p className='hidden-reason-msg b2md'>{reasonMsg}</p>
<button
Expand Down

0 comments on commit c4c73ef

Please sign in to comment.