Skip to content

Commit 428319a

Browse files
committed
refactor: MissionTimer 컴포넌트의 툴팁 구조 변경 및 애니메이션 수정
1 parent f6601b6 commit 428319a

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

src/routes/mission/-components/MissionTimer.tsx

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,14 @@ export default function MissionTimer({
134134
};
135135

136136
return (
137-
<div className="fixed bottom-0 left-0 right-0 flex items-center justify-center p-4 gap-3 max-w-[600px] mx-auto bg-neutral-500 select-none">
138-
<Timer
139-
seconds={time}
140-
className="t-p-42-b text-neutral-100 tracking-[-1.05px] leading-[54.6px]"
141-
/>
142-
<Tooltip.Provider>
143-
<Tooltip.Root open={isTooltipOpen}>
137+
<Tooltip.Provider>
138+
<Tooltip.Root open={isTooltipOpen}>
139+
<div className="fixed bottom-0 left-0 right-0 flex items-center justify-center p-4 gap-3 max-w-[600px] mx-auto bg-neutral-500 select-none">
140+
<Timer
141+
seconds={time}
142+
className="t-p-42-b text-neutral-100 tracking-[-1.05px] leading-[54.6px]"
143+
/>
144+
144145
<Tooltip.Trigger asChild>
145146
<button
146147
type="button"
@@ -172,27 +173,26 @@ export default function MissionTimer({
172173
</Tooltip.Trigger>
173174
<Tooltip.Portal>
174175
<MotionTooltipContent
175-
initial={{ opacity: 0, y: 10 }}
176+
initial={{ y: 10 }}
176177
animate={{
177-
opacity: 1,
178-
y: [0, -4, 0],
178+
y: [0, 7, 0],
179179
}}
180-
exit={{ opacity: 0, y: 10 }}
180+
exit={{ y: 10 }}
181181
transition={{
182182
duration: 1.5,
183183
repeat: Infinity,
184184
ease: "easeInOut",
185185
repeatType: "loop",
186186
}}
187-
className="select-none rounded-[8px] bg-white px-[15px] py-2 text-[15px] leading-none text-violet11 shadow-[hsl(206_22%_7%_/_35%)_0px_10px_38px_-10px,_hsl(206_22%_7%_/_20%)_0px_10px_20px_-15px] will-change-[transform,opacity] data-[state=delayed-open]:data-[side=bottom]:animate-slideUpAndFade data-[state=delayed-open]:data-[side=left]:animate-slideRightAndFade data-[state=delayed-open]:data-[side=right]:animate-slideLeftAndFade data-[state=delayed-open]:data-[side=top]:animate-slideDownAndFade"
187+
className="select-none rounded-[8px] bg-white px-[15px] py-2 text-[15px] leading-none text-violet11 shadow-[hsl(206_22%_7%_/_35%)_0px_10px_38px_-10px,_hsl(206_22%_7%_/_20%)_0px_10px_20px_-15px] will-change-[transform,opacity]"
188188
sideOffset={5}
189189
>
190190
<p className="t-p-14-sb text-blue-500">시작</p>
191191
<Tooltip.Arrow className="fill-white" />
192192
</MotionTooltipContent>
193193
</Tooltip.Portal>
194-
</Tooltip.Root>
195-
</Tooltip.Provider>
196-
</div>
194+
</div>
195+
</Tooltip.Root>
196+
</Tooltip.Provider>
197197
);
198198
}

0 commit comments

Comments
 (0)