File tree Expand file tree Collapse file tree 6 files changed +37
-13
lines changed
apps/web/src/pages/MemeQuizPage/components Expand file tree Collapse file tree 6 files changed +37
-13
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ const ButtonWrapper = styled(motion.div)`
5353 margin: 0 auto;
5454` ;
5555
56- const StartButton = styled . button `
56+ const StartButton = styled ( motion . button ) `
5757 width: 100%;
5858 height: 52px;
5959 background-color: ${ ( { theme } ) => theme . palette . gray [ 'gray-10' ] } ;
Original file line number Diff line number Diff line change @@ -55,7 +55,11 @@ const MemeQuizStart = ({ onNext }: MemeQuizStartProps) => {
5555 stiffness : 100 ,
5656 } }
5757 >
58- < StartButton onClick = { onNext } style = { { position : 'relative' } } >
58+ < StartButton
59+ onClick = { onNext }
60+ style = { { position : 'relative' } }
61+ whileTap = { { scale : 0.95 } }
62+ >
5963 밈퀴즈 시작하기
6064 </ StartButton >
6165 </ ButtonWrapper >
Original file line number Diff line number Diff line change @@ -68,10 +68,6 @@ const NextButton = styled(motion.button)`
6868 ${ ( { theme } ) => theme . typography . title . subhead1 } ;
6969 color: ${ ( { theme } ) => theme . palette . common . white } ;
7070 cursor: pointer;
71-
72- &:hover {
73- opacity: 0.9;
74- }
7571` ;
7672
7773export {
Original file line number Diff line number Diff line change @@ -100,9 +100,18 @@ const QuizResultModal = ({
100100 < NextButton
101101 initial = { { y : 20 , opacity : 0 } }
102102 animate = { { y : 0 , opacity : 1 } }
103- transition = { { duration : 0.4 , delay : 0.8 } }
104- whileHover = { { scale : 1.02 } }
105- whileTap = { { scale : 0.98 } }
103+ whileTap = { {
104+ scale : 0.98 ,
105+ transition : {
106+ type : 'spring' ,
107+ stiffness : 400 ,
108+ damping : 17 ,
109+ } ,
110+ } }
111+ transition = { {
112+ duration : 0.4 ,
113+ delay : 0.8 ,
114+ } }
106115 onClick = { onNext }
107116 >
108117 다음 퀴즈 풀기
Original file line number Diff line number Diff line change 11import styled from '@emotion/styled' ;
22import { keyframes } from '@emotion/react' ;
3+ import { motion } from 'motion/react' ;
34
45const shimmer = keyframes `
56 0% {
@@ -75,7 +76,7 @@ const AnswerContainer = styled.div`
7576 margin-bottom: 108px;
7677` ;
7778
78- const Button = styled . button < { isSelected ?: boolean } > `
79+ const Button = styled ( motion . button ) < { isSelected ?: boolean } > `
7980 width: 100%;
8081 height: 50px;
8182 padding: 0 20px;
@@ -89,7 +90,6 @@ const Button = styled.button<{ isSelected?: boolean }>`
8990 background-color: ${ ( { theme, isSelected } ) =>
9091 isSelected ? theme . palette . main . pink [ 95 ] : theme . palette . gray [ 'gray-9' ] } ;
9192 cursor: pointer;
92- transition: all 0.2s ease-in-out;
9393` ;
9494
9595const ButtonIcon = styled . div < { isSelected ?: boolean } > `
@@ -122,7 +122,7 @@ const BottomContainer = styled.div`
122122 justify-content: center;
123123` ;
124124
125- const BottomButton = styled . button < { disabled ?: boolean } > `
125+ const BottomButton = styled ( motion . button ) < { disabled ?: boolean } > `
126126 width: 100%;
127127 height: 52px;
128128 border: none;
Original file line number Diff line number Diff line change @@ -101,6 +101,12 @@ const QuizStep = ({
101101 key = { index }
102102 onClick = { ( ) => handleAnswerSelect ( index ) }
103103 isSelected = { isSelected }
104+ whileTap = { { scale : 0.98 } }
105+ transition = { {
106+ type : 'spring' ,
107+ stiffness : 400 ,
108+ damping : 17 ,
109+ } }
104110 >
105111 < ButtonIcon isSelected = { isSelected } >
106112 < LinkCopiedIcon width = { 20 } height = { 20 } />
@@ -117,7 +123,16 @@ const QuizStep = ({
117123 </ Content >
118124
119125 < BottomContainer >
120- < BottomButton onClick = { handleNext } disabled = { selectedAnswer === null } >
126+ < BottomButton
127+ onClick = { handleNext }
128+ disabled = { selectedAnswer === null }
129+ whileTap = { ! selectedAnswer ? { } : { scale : 0.98 } }
130+ transition = { {
131+ type : 'spring' ,
132+ stiffness : 400 ,
133+ damping : 17 ,
134+ } }
135+ >
121136 다음
122137 </ BottomButton >
123138 </ BottomContainer >
You can’t perform that action at this time.
0 commit comments