-
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
1 parent
83a4e59
commit 3a19d95
Showing
4 changed files
with
128 additions
and
5 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,9 +1,94 @@ | ||
import { Form, Input } from 'antd'; | ||
import './styles.scss'; | ||
|
||
import { Button, Checkbox, Form, Input } from 'antd'; | ||
import { LoginOutlined } from '@ant-design/icons'; | ||
|
||
export const FormRegisterAuth = () => { | ||
return ( | ||
<Form.Item> | ||
<Input placeholder="Full Name" /> | ||
</Form.Item> | ||
<div className="authContainer"> | ||
<LoginOutlined className="loginOutlinedSVG" style={{ color: 'var(--green-500)' }} /> | ||
<h1>Psychologist Center</h1> | ||
<p>Create your account</p> | ||
<Form.Item | ||
name="name" | ||
rules={[ | ||
{ | ||
required: true, | ||
message: 'Please input your name.', | ||
}, | ||
]} | ||
> | ||
<Input placeholder="Name" /> | ||
</Form.Item> | ||
<Form.Item | ||
name="email" | ||
rules={[ | ||
{ | ||
type: 'email', | ||
message: 'The input is not valid e-mail.', | ||
}, | ||
{ | ||
required: true, | ||
message: 'Please input your e-mail.', | ||
}, | ||
]} | ||
> | ||
<Input placeholder="E-mail" /> | ||
</Form.Item> | ||
<Form.Item | ||
name="password" | ||
rules={[ | ||
{ | ||
required: true, | ||
message: 'Please input your password!', | ||
}, | ||
]} | ||
hasFeedback | ||
> | ||
<Input.Password placeholder="Password" /> | ||
</Form.Item> | ||
<Form.Item | ||
name="confirm" | ||
dependencies={['password']} | ||
hasFeedback | ||
rules={[ | ||
{ | ||
required: true, | ||
message: 'Please confirm your password.', | ||
}, | ||
({ getFieldValue }) => ({ | ||
validator(_, value) { | ||
if (!value || getFieldValue('password') === value) { | ||
return Promise.resolve(); | ||
} | ||
|
||
return Promise.reject(new Error('The two passwords that you entered do not match.')); | ||
}, | ||
}), | ||
]} | ||
> | ||
<Input.Password placeholder="Confirm your password" /> | ||
</Form.Item> | ||
|
||
<Form.Item | ||
name="agreement" | ||
valuePropName="checked" | ||
rules={[ | ||
{ | ||
validator: (_, value) => | ||
value ? Promise.resolve() : Promise.reject(new Error('Should accept agreement')), | ||
}, | ||
]} | ||
> | ||
<Checkbox> | ||
I have read the <a href="">agreement</a> | ||
</Checkbox> | ||
</Form.Item> | ||
<Form.Item> | ||
<Button type="secondary" htmlType="submit"> | ||
Sign up | ||
</Button> | ||
</Form.Item> | ||
</div> | ||
); | ||
}; |
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,37 @@ | ||
.authContainer { | ||
.loginOutlinedSVG { | ||
display: block; | ||
text-align: center; | ||
font-size: 50px; | ||
margin-top: 15px; | ||
margin-bottom: 15px; | ||
} | ||
|
||
h1 { | ||
text-align: center; | ||
font-size: 30px; | ||
color: var(--blue-400); | ||
margin: 0; | ||
} | ||
|
||
p { | ||
text-align: center; | ||
color: var(--blue-400); | ||
margin-bottom: 20px; | ||
} | ||
|
||
button { | ||
float: right; | ||
background-color: var(--green-500); | ||
color: white; | ||
} | ||
|
||
border: 1px solid var(--gray-300); | ||
padding: 20px; | ||
max-width: 600px; | ||
margin: auto; | ||
|
||
background: #ffffff; | ||
box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.1); | ||
border-radius: 10px; | ||
} |
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