-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
1,067 additions
and
7 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
function NotFound() { | ||
return ( | ||
<div className="signin-container"> | ||
<div>404 ERROR</div> | ||
</div> | ||
); | ||
} | ||
|
||
export default NotFound; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.selected-type { | ||
color: #100538; | ||
border-bottom: 3px solid #100538; | ||
} | ||
|
||
.non-selected-type { | ||
color: #777777; | ||
border-bottom: 3px solid white; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
import { useState } from "react"; | ||
import { | ||
SigninContainer, | ||
SigninFormContainer, | ||
SigninInputContainer, | ||
SigninInput, | ||
SigninInputWrapper, | ||
SigninButton, | ||
SigninTypeContainer, | ||
TypeTab, | ||
} from "./SigninStyle"; | ||
import "./Signin.css"; | ||
import { Link } from "react-router-dom"; | ||
|
||
function Signin() { | ||
const [userType, setUserType] = useState("A"); | ||
const [userId, setUserId] = useState(""); | ||
const [password, setPassword] = useState(""); | ||
|
||
const setUser = () => { | ||
setUserType("A"); | ||
}; | ||
|
||
const setPartner = () => { | ||
setUserType("B"); | ||
}; | ||
|
||
const handleUserIdInput = (event) => { | ||
setUserId(event.target.value); | ||
}; | ||
|
||
const handlePasswordInput = (event) => { | ||
setPassword(event.target.value); | ||
}; | ||
|
||
const onclickSigninButton = () => { | ||
console.log(userType, userId, password); | ||
}; | ||
|
||
return ( | ||
<SigninContainer> | ||
<div className="DD">로그인 화면입니다</div> | ||
<SigninTypeContainer> | ||
<TypeTab | ||
className={userType == "A" ? "selected-type" : "non-selected-type"} | ||
onClick={setUser} | ||
> | ||
기본회원 | ||
</TypeTab> | ||
<TypeTab | ||
className={userType == "B" ? "selected-type" : "non-selected-type"} | ||
onClick={setPartner} | ||
> | ||
파트너회원 | ||
</TypeTab> | ||
</SigninTypeContainer> | ||
<SigninFormContainer> | ||
<SigninInputContainer> | ||
<SigninInputWrapper className="signin-input-wrapper"> | ||
<SigninInput | ||
value={userId} | ||
onChange={handleUserIdInput} | ||
placeholder="아이디" | ||
></SigninInput> | ||
</SigninInputWrapper> | ||
<SigninInputWrapper className="signin-input-wrapper"> | ||
<SigninInput | ||
value={password} | ||
onChange={handlePasswordInput} | ||
placeholder="비밀번호" | ||
type="password" | ||
></SigninInput> | ||
</SigninInputWrapper> | ||
</SigninInputContainer> | ||
<SigninButton onClick={onclickSigninButton}>로그인</SigninButton> | ||
</SigninFormContainer> | ||
<Link to={"/signup"}>회원가입</Link> | ||
</SigninContainer> | ||
); | ||
} | ||
|
||
export default Signin; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
import styled from "styled-components"; | ||
|
||
export const SigninContainer = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
height: 100%; | ||
margin-top: 100px; | ||
`; | ||
|
||
export const SigninFormContainer = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
gap: 8px; | ||
width: 600px; | ||
height: 400px; | ||
`; | ||
|
||
export const SigninInputContainer = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
`; | ||
|
||
export const SigninInputWrapper = styled.div` | ||
display: flex; | ||
flex-direction: row; | ||
border: 1px solid #a9a9a9; | ||
border-radius: 0; | ||
padding: 6px 15px; | ||
`; | ||
|
||
export const SigninInput = styled.input` | ||
width: 100%; | ||
border: none; | ||
outline: none; | ||
&:focus { | ||
outline: none; | ||
border: none; | ||
} | ||
&:focus ~ .signin-input-wrapper { | ||
border: 1px solid #000000; | ||
} | ||
`; | ||
|
||
export const SigninButton = styled.button` | ||
width: 100%; | ||
height: 40px; | ||
font-size: 14px; | ||
font-weight: 900; | ||
background-color: #03062b; | ||
color: white; | ||
border: none; | ||
border-radius: 10px; | ||
cursor: pointer; | ||
`; | ||
|
||
export const SigninTypeContainer = styled.div` | ||
display: flex; | ||
flex-direction: row; | ||
align-items: center; | ||
justify-content: center; | ||
margin: 16px 0 16px 0; | ||
`; | ||
|
||
export const TypeTab = styled.div` | ||
padding: 6px 14px; | ||
font-weight: 800; | ||
cursor: pointer; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
.signup-form-container { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
|
||
.selected-type { | ||
color: #100538; | ||
border-bottom: 3px solid #100538; | ||
} | ||
|
||
.non-selected-type { | ||
color: #777777; | ||
border-bottom: 3px solid white; | ||
} | ||
|
||
.show-form { | ||
display: block; | ||
} | ||
|
||
.hide-form { | ||
display: none; | ||
} | ||
|
||
p { | ||
margin: 0; | ||
margin-bottom: 4px; | ||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
.password-check { | ||
font-size: 10px; | ||
color: grey; | ||
} | ||
|
||
.full-width-input { | ||
width: 432px; | ||
} |
Oops, something went wrong.