Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
Tia-dev
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dida Adams Arizona
Tia-dev
Commits
abc6206f
Commit
abc6206f
authored
Aug 07, 2020
by
EKSAD
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update login
parent
44f94453
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
6 deletions
+39
-6
Login.js
src/container/Login.js
+39
-6
No files found.
src/container/Login.js
View file @
abc6206f
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
Images
from
'../assets/Images'
;
import
Images
from
'../assets/Images'
;
import
{
Checkbox
,
Button
,
InputAdornment
,
TextField
,
InputLabel
}
from
'@material-ui/core'
;
import
{
Checkbox
,
Button
,
InputAdornment
,
TextField
,
InputLabel
,
Typography
,
IconButton
}
from
'@material-ui/core'
;
import
{
withStyles
}
from
'@material-ui/core/styles'
;
import
{
withStyles
}
from
'@material-ui/core/styles'
;
import
Visibility
from
'@material-ui/icons/Visibility'
;
import
VisibilityOff
from
'@material-ui/icons/VisibilityOff'
;
const
CustomCheckbox
=
withStyles
({
const
CustomCheckbox
=
withStyles
({
root
:
{
root
:
{
...
@@ -14,6 +16,26 @@ const CustomCheckbox = withStyles({
...
@@ -14,6 +16,26 @@ const CustomCheckbox = withStyles({
})((
props
)
=>
<
Checkbox
color
=
"default"
{...
props
}
/>
)
;
})((
props
)
=>
<
Checkbox
color
=
"default"
{...
props
}
/>
)
;
class
Login
extends
Component
{
class
Login
extends
Component
{
constructor
(
props
)
{
super
(
props
)
this
.
state
=
{
username
:
''
,
password
:
''
,
showPass
:
false
}
}
componentDidMount
()
{
// this.coba()
}
coba
(
e
)
{
this
.
setState
({
username
:
e
})
}
render
()
{
render
()
{
return
(
return
(
<
div
style
=
{{
flex
:
1
,
display
:
'flex'
}}
>
<
div
style
=
{{
flex
:
1
,
display
:
'flex'
}}
>
...
@@ -30,9 +52,11 @@ class Login extends Component {
...
@@ -30,9 +52,11 @@ class Login extends Component {
id
=
"username"
id
=
"username"
type
=
{
"text"
}
type
=
{
"text"
}
name
=
{
"username"
}
name
=
{
"username"
}
value
=
{
this
.
state
.
username
}
onChange
=
{(
e
)
=>
this
.
setState
({
username
:
e
.
target
.
value
})}
variant
=
"outlined"
variant
=
"outlined"
error
=
{
false
}
error
=
{
false
}
style
=
{{
width
:
'100%'
,
height
:
51
,
marginTop
:
32
}}
style
=
{{
width
:
'100%'
,
height
:
51
,
marginTop
:
32
,
fontSize
:
14
}}
helperText
=
""
helperText
=
""
InputProps
=
{{
InputProps
=
{{
endAdornment
:
<
InputAdornment
position
=
"end"
><
img
src
=
{
Images
.
email
}
/></
InputAdornment
>
,
endAdornment
:
<
InputAdornment
position
=
"end"
><
img
src
=
{
Images
.
email
}
/></
InputAdornment
>
,
...
@@ -42,14 +66,23 @@ class Login extends Component {
...
@@ -42,14 +66,23 @@ class Login extends Component {
<
TextField
<
TextField
label
=
"Kata Sandi *"
label
=
"Kata Sandi *"
id
=
"password"
id
=
"password"
type
=
{
"password"
}
type
=
{
this
.
state
.
showPass
?
'text'
:
'password'
}
name
=
{
"password"
}
name
=
{
"password"
}
variant
=
"outlined"
variant
=
"outlined"
error
=
{
tru
e
}
error
=
{
fals
e
}
style
=
{{
width
:
'100%'
,
height
:
51
,
marginTop
:
12
}}
style
=
{{
width
:
'100%'
,
height
:
51
,
marginTop
:
12
}}
helperText
=
""
helperText
=
""
InputProps
=
{{
InputProps
=
{{
endAdornment
:
<
InputAdornment
position
=
"end"
><
img
src
=
{
Images
.
key
}
/></
InputAdornment
>
,
endAdornment
:
<
InputAdornment
position
=
"end"
>
<
IconButton
aria
-
label
=
"toggle password visibility"
style
=
{{
color
:
'#4b4b4b'
,
opacity
:
0.5
}}
onClick
=
{()
=>
this
.
setState
({
showPass
:
!
this
.
state
.
showPass
})}
edge
=
"end"
>
{
this
.
state
.
showPass
?
<
Visibility
style
=
{{
fontSize
:
18
}}
/> : <VisibilityOff style={{fontSize: 18}} /
>
}
<
/IconButton
>
<
/InputAdornment>
,
}}
}}
/
>
/
>
...
@@ -59,7 +92,7 @@ class Login extends Component {
...
@@ -59,7 +92,7 @@ class Login extends Component {
<
span
style
=
{{
marginLeft
:
30
,
color
:
'#51c6ea'
,
cursor
:
'pointer'
}}
>
Lupa
Kata
Sandi
?
<
/span
>
<
span
style
=
{{
marginLeft
:
30
,
color
:
'#51c6ea'
,
cursor
:
'pointer'
}}
>
Lupa
Kata
Sandi
?
<
/span
>
<
/div
>
<
/div
>
<
Button
variant
=
"contained"
style
=
{{
marginTop
:
23
,
width
:
'100%'
,
height
:
35
,
borderRadius
:
4
}}
disabled
>
<
Button
variant
=
"contained"
style
=
{{
marginTop
:
23
,
width
:
'100%'
,
height
:
35
,
borderRadius
:
4
}}
disabled
>
Login
<
Typography
style
=
{{
fontSize
:
12
}}
>
Login
<
/Typography
>
<
/Button
>
<
/Button
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
...
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