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

✨ feat: 플로팅 버튼 추가 #245

Merged
merged 4 commits into from
Dec 2, 2024
Merged

✨ feat: 플로팅 버튼 추가 #245

merged 4 commits into from
Dec 2, 2024

Conversation

jungmyunggi
Copy link
Collaborator

🔨 테스크

📋 작업 내용

  • 플로팅 버튼 파일 분리
export default function SideButton() {
  const scrollToTop = () => {
    window.scrollTo({
      top: 0,
      behavior: "smooth",
    });
  };

  return (
    <div className="flex h-full items-center ">
      <SidebarProvider defaultOpen={false}>
        <Chat />
        <OpenChat />
      </SidebarProvider>
      <button className="fixed text-white bottom-[6.5rem] right-7 bg-primary hover:bg-secondary !rounded-full p-3">
        <Home size={25} />
      </button>
      <button className="fixed text-white bottom-[10.5rem] right-7 bg-[#1ABC9C] hover:bg-[#16A085] !rounded-full p-3">
        <ChartArea size={25} />
      </button>
      <button className="fixed text-white bottom-[14.5rem] right-7 bg-[#F1C40F] hover:bg-[#D4AC0D] !rounded-full p-3">
        <CircleHelp size={25} />
      </button>
      <button
        className="fixed text-white bottom-[2.5rem] right-7 bg-[#9B59B6] hover:bg-[#8E44AD] !rounded-full p-3"
        onClick={scrollToTop}
      >
        <ArrowUp size={25} />
      </button>
    </div>
  );
}

  • 위로가기 버튼 구현
export default function SideButton() {
  const scrollToTop = () => {
    window.scrollTo({
      top: 0,
      behavior: "smooth",
    });
  };

📷 스크린 샷

image

@jungmyunggi jungmyunggi added the 🔨 Refactor 리팩토링 (구조 변경) label Dec 2, 2024
@jungmyunggi jungmyunggi requested a review from junyeokk December 2, 2024 01:43
@jungmyunggi jungmyunggi self-assigned this Dec 2, 2024
Copy link

netlify bot commented Dec 2, 2024

Deploy Preview for denamu canceled.

Name Link
🔨 Latest commit 43e9704
🔍 Latest deploy log https://app.netlify.com/sites/denamu/deploys/674d17be2ba7cb00084d31cd

@jungmyunggi jungmyunggi merged commit 5a1546c into main Dec 2, 2024
1 check passed
@jungmyunggi jungmyunggi deleted the feat/float-button branch December 2, 2024 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 Refactor 리팩토링 (구조 변경)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FE] 플로팅 버튼 추가
2 participants