File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree File renamed without changes.
Original file line number Diff line number Diff line change 1+ import React from 'react'
2+ import { Input } from '../atoms/Input'
3+ import { ErrorMessage } from '../atoms/ErrorMessage'
4+
5+ interface LoginFieldsProps {
6+ email : string
7+ password : string
8+ errors : { email ?: string ; password ?: string }
9+ onChange : ( e : React . ChangeEvent < HTMLInputElement > ) => void
10+ }
11+
12+ export const LoginFields : React . FC < LoginFieldsProps > = ( {
13+ email,
14+ password,
15+ errors,
16+ onChange,
17+ } ) => (
18+ < >
19+ < Input
20+ type = "email"
21+ name = "email"
22+ placeholder = "E-mail"
23+ autoComplete = "email"
24+ value = { email }
25+ onChange = { onChange }
26+ />
27+ { errors . email && < ErrorMessage message = { errors . email } /> }
28+
29+ < Input
30+ type = "password"
31+ name = "password"
32+ placeholder = "Password"
33+ autoComplete = "current-password"
34+ value = { password }
35+ onChange = { onChange }
36+ />
37+ { errors . password && < ErrorMessage message = { errors . password } /> }
38+ </ >
39+ )
Original file line number Diff line number Diff line change 1+ import React from 'react'
2+ import { Input } from '../atoms/Input'
3+ import { ErrorMessage } from '../atoms/ErrorMessage'
4+
5+ interface RegisterFieldsProps {
6+ email : string
7+ password : string
8+ repeatPassword : string
9+ errors : {
10+ email ?: string
11+ password ?: string
12+ repeatPassword ?: string
13+ }
14+ onChange : ( e : React . ChangeEvent < HTMLInputElement > ) => void
15+ }
16+
17+ export const RegisterFields : React . FC < RegisterFieldsProps > = ( {
18+ email,
19+ password,
20+ repeatPassword,
21+ errors,
22+ onChange,
23+ } ) => (
24+ < >
25+ < Input
26+ type = "email"
27+ name = "email"
28+ placeholder = "E-mail"
29+ autoComplete = "email"
30+ value = { email }
31+ onChange = { onChange }
32+ />
33+ { errors . email && < ErrorMessage message = { errors . email } /> }
34+
35+ < Input
36+ type = "password"
37+ name = "password"
38+ placeholder = "Password"
39+ autoComplete = "new-password"
40+ value = { password }
41+ onChange = { onChange }
42+ />
43+ { errors . password && < ErrorMessage message = { errors . password } /> }
44+
45+ < Input
46+ type = "password"
47+ name = "repeatPassword"
48+ placeholder = "Repeat Password"
49+ autoComplete = "new-password"
50+ value = { repeatPassword }
51+ onChange = { onChange }
52+ />
53+ { errors . repeatPassword && < ErrorMessage message = { errors . repeatPassword } /> }
54+ </ >
55+ )
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11import React from 'react'
22import styled from 'styled-components'
3- import { LoginForm } from '../molecules /LoginForm'
3+ import { LoginForm } from './LoginForm'
44
55const Wrapper = styled . div `
66 display: flex;
77 flex-direction: column;
8+ gap: 16px;
89 width: 100%;
910`
1011
1112export const LoginCard : React . FC = ( ) => (
1213 < Wrapper >
1314 < LoginForm />
1415 </ Wrapper >
15- )
16+ )
You can’t perform that action at this time.
0 commit comments