Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I_Helmet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
21_22-J 62
I_Helmet
Commits
eaeedf50
Commit
eaeedf50
authored
Apr 19, 2022
by
Balasuriya D.A.M.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Loginup Component Frontend
parent
f3c89861
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
73 additions
and
4 deletions
+73
-4
IT18021080/Telemedicine-Chat-App/frontend/src/components/Authentication/Login.js
...-Chat-App/frontend/src/components/Authentication/Login.js
+73
-4
No files found.
IT18021080/Telemedicine-Chat-App/frontend/src/components/Authentication/Login.js
View file @
eaeedf50
import
React
from
"
react
"
;
//Formercontrol,formerlabel from form-control
//Input,InputGroup from input
//VStack from layout
//everything import from react
import
{
Button
,
FormControl
,
FormLabel
,
Input
,
InputGroup
,
InputRightElement
,
VStack
}
from
"
@chakra-ui/react
"
;
import
React
,
{
useState
}
from
"
react
"
;
const
Login
=
()
=>
{
const
Login
=
()
=>
{
const
[
show
,
setShow
]
=
useState
(
false
);
const
[
email
,
setEmail
]
=
useState
();
const
[
password
,
setPassword
]
=
useState
();
const
handleClick
=
()
=>
setShow
(
!
show
);
const
submitHandler
=
()
=>
{
};
return
(
return
(
<
div
>
//Use vstack to allign verticaly
Login
<
VStack
spacing
=
"
5px
"
color
=
"
black
"
>
<
/div
>
<
FormControl
id
=
"
email
"
isRequired
>
<
FormLabel
>
Email
<
/FormLabel
>
<
Input
placeholder
=
"
Enter Your Email
"
onChange
=
{(
e
)
=>
setEmail
(
e
.
target
.
value
)}
/
>
<
/FormControl
>
<
FormControl
id
=
"
password
"
isRequired
>
<
FormLabel
>
Password
<
/FormLabel
>
<
InputGroup
>
<
Input
type
=
{
show
?
"
text
"
:
"
password
"
}
placeholder
=
"
Enter Your Password
"
onChange
=
{(
e
)
=>
setPassword
(
e
.
target
.
value
)}
/
>
<
InputRightElement
width
=
"
4.5rem
"
>
<
Button
h
=
"
1.75rem
"
size
=
"
sm
"
onClick
=
{
handleClick
}
>
{
show
?
"
Hide
"
:
"
Show
"
}
<
/Button
>
<
/InputRightElement
>
<
/InputGroup
>
<
/FormControl
>
<
Button
colorScheme
=
"
blue
"
width
=
"
100%
"
style
=
{{
marginTop
:
15
}}
onClick
=
{
submitHandler
}
>
Login
<
/Button
>
<
Button
variant
=
"
solid
"
colorScheme
=
"
red
"
width
=
"
100%
"
onClick
=
{()
=>
{
setEmail
(
"
guest@example.com
"
);
setPassword
(
"
123456
"
);
}}
>
Get
Guest
User
Credentials
<
/Button
>
<
/VStack
>
);
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment