Skip to content
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

[SP2] 메인페이지 모집알림신청 버튼 QA #297

Merged
merged 2 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function RecruitButton({ children }: PropsWithChildren<object>) {
<Link href="/recruit">
<S.RecruitButtonWrapper>
<S.MouseTrackerWrapper onMouseMove={handleMouseMove} x={blurPosition.x} y={blurPosition.y}>
{children}
<div>{children}</div>
</S.MouseTrackerWrapper>
</S.RecruitButtonWrapper>
</Link>
Expand Down
47 changes: 41 additions & 6 deletions src/views/MainPage/components/Banner/RecruitButton/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,46 @@ export const MouseTrackerWrapper = styled.div<{ x: number; y: number }>`
cursor: pointer;
height: 60px;
padding: 15px 28px;
&:hover {
background-image: ${({ x, y }) =>
`radial-gradient(circle 36px at ${x}px ${y}px, #3E5E7D90, transparent),
radial-gradient(circle 80px at ${x}px ${y}px, #3E5E7D50, transparent),
radial-gradient(circle 108px at ${x}px ${y}px, #3E5E7D50, transparent)`};
background: transparent;
position: relative;
overflow: hidden;

&::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-image: radial-gradient(
circle 36px at ${(props) => props.x}px ${(props) => props.y}px,
#3e5e7d90,
transparent
),
radial-gradient(
circle 80px at ${(props) => props.x}px ${(props) => props.y}px,
#3e5e7d50,
transparent
),
radial-gradient(
circle 108px at ${(props) => props.x}px ${(props) => props.y}px,
#3e5e7d50,
transparent
);
Comment on lines +59 to +73
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 부분 기존 코드 처럼 x.y를 구조분해할당으로 받아서 코드 작성은 안되나요?

background-image: ${({ x, y }) =>
      `radial-gradient(circle 36px at ${x}px ${y}px, #3E5E7D90, transparent),
       radial-gradient(circle 80px at ${x}px ${y}px, #3E5E7D50, transparent),
       radial-gradient(circle 108px at ${x}px ${y}px, #3E5E7D50, transparent)`};

opacity: 0;
transition-duration: 0.4s;
transition-delay: 0.2s;
}

&:hover::before {
opacity: 1;
}

> * {
transition: transform 0.2s;
}

&:hover > * {
transform: scale(0.96);
}
transition: background 300ms ease;
`;
Loading