LoginPresenter.tsx
2.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import React from 'react';
import * as styled from './LoginStyled';
interface LoginProps {
loginForm : {
userId : string,
password : string,
};
onSetUserId : React.ChangeEventHandler<HTMLInputElement>;
onSetPassword : React.ChangeEventHandler<HTMLInputElement>;
onLogin : React.MouseEventHandler<HTMLButtonElement>;
}
const LoginPresenter = (props : LoginProps) => {
return (
<styled.Container>
<styled.LoginWrapper>
<styled.LoginInputWrapper>
<styled.LoginEachInputWrapper>
<styled.LoginInputText>
이메일
</styled.LoginInputText>
<styled.LoginInput
type = 'text'
value = {props.loginForm.userId}
onChange = {props.onSetUserId}
placeholder = 'Email'
/>
</styled.LoginEachInputWrapper>
<styled.LoginEachInputWrapper>
<styled.LoginInputText>
비밀번호
</styled.LoginInputText>
<styled.LoginInput
type = 'password'
value = {props.loginForm.password}
onChange = {props.onSetPassword}
placeholder = 'Password'
/>
</styled.LoginEachInputWrapper>
</styled.LoginInputWrapper>
<styled.RegisterButtonWrapper>
<styled.RegisterButton
onClick = {() => console.log('회원가입 버튼')}
>
회원가입
</styled.RegisterButton>
</styled.RegisterButtonWrapper>
<styled.LoginButtonWrapper>
<styled.LoginButton
onClick = {props.onLogin}
isLoginButton = {true}
>
로그인
</styled.LoginButton>
</styled.LoginButtonWrapper>
</styled.LoginWrapper>
</styled.Container>
);
};
export default LoginPresenter;