File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
2
import { TextValidator } from 'react-material-ui-form-validator' ;
3
+ import { withStyles } from '@material-ui/core/styles' ;
3
4
import { InputAdornment } from '@material-ui/core' ;
4
5
import Visibility from '@material-ui/icons/Visibility' ;
5
6
import VisibilityOff from '@material-ui/icons/VisibilityOff' ;
6
7
import IconButton from '@material-ui/core/IconButton' ;
7
8
8
- export default class PasswordValidator extends React . Component {
9
+ const styles = theme => (
10
+ {
11
+ input : {
12
+ "&::-ms-reveal" : {
13
+ display : "none"
14
+ }
15
+ }
16
+ } ) ;
17
+
18
+ class PasswordValidator extends React . Component {
9
19
10
20
state = {
11
21
showPassword : false
@@ -18,11 +28,13 @@ export default class PasswordValidator extends React.Component {
18
28
}
19
29
20
30
render ( ) {
31
+ const { classes, ...rest } = this . props ;
21
32
return (
22
33
< TextValidator
23
- { ...this . props }
34
+ { ...rest }
24
35
type = { this . state . showPassword ? 'text' : 'password' }
25
36
InputProps = { {
37
+ classes,
26
38
endAdornment :
27
39
< InputAdornment position = "end" >
28
40
< IconButton
@@ -38,3 +50,5 @@ export default class PasswordValidator extends React.Component {
38
50
}
39
51
40
52
}
53
+
54
+ export default withStyles ( styles ) ( PasswordValidator ) ;
You can’t perform that action at this time.
0 commit comments