Skip to content

Commit

Permalink
[#4] feat : add login modal
Browse files Browse the repository at this point in the history
  • Loading branch information
JZU0 committed Dec 19, 2023
1 parent 7c73528 commit 9b36eaf
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 0 deletions.
Binary file added src/assets/images/google.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/kakao.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions src/components/LoginModal/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import React from "react";
import { useNavigate } from "react-router-dom";
import {
Container,
GoogleButton,
KakaoButton,
NonmemberButton,
} from "./styled";
import google from "../../assets/images/google.png";
import kakao from "../../assets/images/kakao.png";

const LoginModal = () => {
const navigate = useNavigate();

const handleNonmemberButtonClick = () => {
navigate("/test/0");
};

return (
<Container>
<GoogleButton>
<img src={google} alt="google" />
&nbsp;Google 계정으로 로그인
</GoogleButton>
<KakaoButton>
<img src={kakao} alt="kakao" />
&nbsp;카카오톡으로 로그인
</KakaoButton>
<NonmemberButton onClick={handleNonmemberButtonClick}>
&nbsp;비회원으로 테스트 하기&nbsp;
</NonmemberButton>
</Container>
);
};

export default LoginModal;
53 changes: 53 additions & 0 deletions src/components/LoginModal/styled.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import styled from "styled-components";

export const Container = styled.div`
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%);
width: 85vw;
height: 27vh;
border-radius: 10px;
background: rgba(255, 255, 255, 0.8);
box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
`;
export const GoogleButton = styled.button`
border-radius: 10px;
border: 1px solid rgba(19, 69, 96, 0.5);
background: #e2e8ec;
box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
backdrop-filter: blur(2px);
display: flex;
width: 80%;
height: 40px;
justify-content: center;
align-items: center;
`;
export const KakaoButton = styled.button`
display: flex;
width: 80%;
height: 40px;
justify-content: center;
align-items: center;
border-radius: 10px;
border: 1px solid rgba(19, 69, 96, 0.5);
background: #fae64c;
box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
backdrop-filter: blur(2px);
`;
export const NonmemberButton = styled.button`
display: flex;
width: 80%;
height: 40px;
justify-content: center;
align-items: center;
border-radius: 10px;
border: 1px solid rgba(19, 69, 96, 0.5);
background: white;
box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
backdrop-filter: blur(2px);s
`;
3 changes: 3 additions & 0 deletions src/components/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
export { default as Button } from "./Button";
export { default as TestHeader } from "./TestHeader";
export { default as TestBox } from "./TestBox";
export { default as SnowAnimation } from "./SnowAnimation";
export { default as SideMenu } from "./SideMenu";
export { default as LoginModal } from "./LoginModal";

0 comments on commit 9b36eaf

Please sign in to comment.