Skip to content

Commit 97f6d80

Browse files
committed
feat: 구글폼 버튼에 툴팁 추가 및 레이아웃 수정
1 parent 75c448e commit 97f6d80

File tree

2 files changed

+22
-16
lines changed

2 files changed

+22
-16
lines changed
Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
1-
import { Button } from '@/components/ui/button';
2-
31
import GoogleForm from './../../../../public/icons/google-form.png';
42
import Image from 'next/image';
53
export const GoogleFormBtn = () => {
64
return (
7-
<>
8-
<Button
9-
onClick={() =>
10-
window.open(
11-
'https://docs.google.com/forms/d/e/1FAIpQLSfRoquj0yyevkgalFsJwKl4UcvZ3FRhuRyK1j8edJLS7S4aFw/viewform?usp=header'
12-
)
13-
}
14-
className="bg-[#214d35] hover:bg-[#276e48] text-white rounded-full w-14 h-14 p-0 shadow-lg hover:shadow-xl transition-all duration-200"
15-
>
16-
<Image src={GoogleForm} alt="google-form" width={24} height={24} />
17-
</Button>
18-
</>
5+
<div
6+
onClick={() =>
7+
window.open(
8+
'https://docs.google.com/forms/d/e/1FAIpQLSfRoquj0yyevkgalFsJwKl4UcvZ3FRhuRyK1j8edJLS7S4aFw/viewform?usp=header'
9+
)
10+
}
11+
className="bg-primary flex justify-center items-center hover:bg-hover-primary rounded-full w-14 h-14 p-0 shadow-lg hover:shadow-xl transition-all duration-200"
12+
>
13+
<Image src={GoogleForm} alt="google-form" width={24} height={24} />
14+
</div>
1915
);
2016
};

src/widgets/globalFloatingWidget/ui/index.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { usePathname } from 'next/navigation';
77
import Cookies from 'js-cookie';
88
import { useEffect, useState } from 'react';
99
import { GoogleFormBtn } from '@/features/google-form/ui/GoogleFormButton';
10+
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';
1011
export function GlobalFloatingWidget() {
1112
const problemId = usePathname().split('/')[2];
1213
const [isLogged, setIsLogged] = useState(false);
@@ -22,13 +23,22 @@ export function GlobalFloatingWidget() {
2223

2324
if (problemId) return null;
2425

26+
const tooltipContent = '오류 사항, 제안 사항을 구글폼에 남겨주세요!';
2527
return (
26-
<div className="fixed top-[calc(100vh-15%)] left-[calc(100vw-5%)] flex flex-col gap-2">
28+
<div className="fixed bottom-[calc(100vh-95%)] left-[calc(100vw-5%)] flex flex-col gap-2">
2729
{isLogged && <ChatDialogOpenButton />}
2830
{isLogged && (
2931
<GameModalButton hasCharacter={characterData?.data?.result?.isCharacterExist || false} />
3032
)}
31-
<GoogleFormBtn />
33+
34+
<Tooltip>
35+
<TooltipTrigger>
36+
<GoogleFormBtn />
37+
</TooltipTrigger>
38+
<TooltipContent>
39+
<p>{tooltipContent}</p>
40+
</TooltipContent>
41+
</Tooltip>
3242
</div>
3343
);
3444
}

0 commit comments

Comments
 (0)