Skip to content
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
11 changes: 7 additions & 4 deletions src/components/Landing/LandingPart-1/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { useCallback, useEffect, useRef, useState } from 'react';
import BackToTop from '../../../images/BackToTop.gif';

import LoginModal from '../../Common/LoginModal';
import Modal from '../../Common/Modal';
Expand All @@ -12,6 +11,8 @@ import {
ContentsWrapper,
BackToTopButton,
Dimed,
BackToTopButtonWrapper,
BackToTopIcon,
} from './styles';

const LandingFirst = (): JSX.Element => {
Expand All @@ -38,7 +39,7 @@ const LandingFirst = (): JSX.Element => {
}}
>
<Dimed>
<BackToTopButton
<BackToTopButtonWrapper
style={{
opacity: `${scrollPosition > 100 ? `1` : `0`}`,
color: `${
Expand All @@ -58,9 +59,11 @@ const LandingFirst = (): JSX.Element => {
}
}}
>
<img src={BackToTop} />
<BackToTopButton>
<BackToTopIcon />
</BackToTopButton>
<p>맨위로</p>
</BackToTopButton>
</BackToTopButtonWrapper>
<ContentsWrapper>
<MainMessage>토이 프로젝트의 에센셜</MainMessage>
<SubMessage>동료와 작업공간을 한 곳에서 만나보세요</SubMessage>
Expand Down
19 changes: 17 additions & 2 deletions src/components/Landing/LandingPart-1/styles.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import styled from 'styled-components';
import { IoIosArrowUp } from 'react-icons/io';

export const LandingFirstContainer = styled.div`
${({ theme }) => theme.align.flexCenter};
Expand Down Expand Up @@ -65,8 +66,10 @@ export const FreeExpButton = styled.div`

// ----------------TODO: 맨 위로 가기 버튼----------------

export const BackToTopButton = styled.button`
export const BackToTopButtonWrapper = styled.div`
cursor: pointer;
${({ theme }) => theme.align.flexCenter};
flex-direction: column;
position: fixed;
right: 2vw;
bottom: 4vh;
Expand All @@ -80,8 +83,20 @@ export const BackToTopButton = styled.button`
}

& > p {
margin-top: -8px;
margin-top: 2px;
font-family: NanumSquareB;
font-size: 14px;
}
`;

export const BackToTopButton = styled.div`
${({ theme }) => theme.align.flexCenter};
padding: 4px;
color: white;
background-color: rgba(0, 0, 0, 0.3);
border-radius: 3px;
`;

export const BackToTopIcon = styled(IoIosArrowUp)`
font-size: 20px;
`;
Binary file removed src/images/BackToTop.gif
Binary file not shown.