File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import React, { Component } from 'react';
22import ReactDOM from 'react-dom' ;
33import Input from 'react-component_input' ;
44import Button from './button' ;
5+ import Password from './password' ;
56import Radio from './radio' ;
67import TextExample from './text' ;
78import Textarea from './textarea' ;
@@ -10,6 +11,7 @@ const appElement = document.getElementById('example');
1011
1112const examples = [
1213 Button ,
14+ Password ,
1315 Radio ,
1416 TextExample ,
1517 Textarea
Original file line number Diff line number Diff line change 1+ import React , { Component } from 'react' ;
2+ import Input from 'react-component_input' ;
3+
4+ class Password extends Component {
5+ render ( ) {
6+ return (
7+ < div >
8+ < Input
9+ identifier = "passwordInput"
10+ labelContent = "Password Input"
11+ type = "password"
12+ />
13+ </ div >
14+ ) ;
15+ }
16+ }
17+
18+ export default {
19+ label : "Input - Password" ,
20+ app : Password
21+ } ;
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import React, { Component } from 'react';
22import ReactDOM from 'react-dom' ;
33import Input from 'react-component_input' ;
44import Button from './button' ;
5+ import Password from './password' ;
56import Radio from './radio' ;
67import TextExample from './text' ;
78import Textarea from './textarea' ;
@@ -10,6 +11,7 @@ const appElement = document.getElementById('example');
1011
1112const examples = [
1213 Button ,
14+ Password ,
1315 Radio ,
1416 TextExample ,
1517 Textarea
Original file line number Diff line number Diff line change 1+ import React , { Component } from 'react' ;
2+ import Input from 'react-component_input' ;
3+
4+ class Password extends Component {
5+ render ( ) {
6+ return (
7+ < div >
8+ < Input
9+ identifier = "passwordInput"
10+ labelContent = "Password Input"
11+ type = "password"
12+ inputClassNames = "form-control"
13+ />
14+ </ div >
15+ ) ;
16+ }
17+ }
18+
19+ export default {
20+ label : "Input - Password" ,
21+ app : Password
22+ } ;
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import React, { Component } from 'react';
22import ReactDOM from 'react-dom' ;
33import Input from 'react-component_input' ;
44import Button from './button' ;
5+ import Password from './password' ;
56import Radio from './radio' ;
67import TextExample from './text' ;
78import Textarea from './textarea' ;
@@ -10,6 +11,7 @@ const appElement = document.getElementById('example');
1011
1112const examples = [
1213 Button ,
14+ Password ,
1315 Radio ,
1416 TextExample ,
1517 Textarea
Original file line number Diff line number Diff line change 1+ import React , { Component } from 'react' ;
2+ import Input from 'react-component_input' ;
3+
4+ class Password extends Component {
5+ render ( ) {
6+ return (
7+ < div >
8+ < Input
9+ identifier = "passwordInput"
10+ labelContent = "Password Input"
11+ type = "password"
12+ containerClassNames = { [ "button-custom-container" , "my-button-custom-container" ] }
13+ inputClassNames = { [ "button-custom-input" , "my-button-custom-input" ] }
14+ labelClassNames = { [ "button-custom-label" , "my-button-custom-label" ] }
15+ validationClassNames = { [ "button-custom-validation" , "my-button-custom-validation" ] }
16+ />
17+ </ div >
18+ ) ;
19+ }
20+ }
21+
22+ export default {
23+ label : "Input - Password" ,
24+ app : Password
25+ } ;
Original file line number Diff line number Diff line change 11import React , { Component } from 'react' ;
22import ReactDOM from 'react-dom' ;
33import Input from 'react-component_input' ;
4+ import Password from './password' ;
45import TextExample from './text' ;
56import Textarea from './textarea' ;
67
78const appElement = document . getElementById ( 'example' ) ;
89
910const examples = [
11+ Password ,
1012 TextExample ,
1113 Textarea
1214] ;
Original file line number Diff line number Diff line change 1+ import React , { Component } from 'react' ;
2+ import Input from 'react-component_input' ;
3+
4+ let validMaxLength = ( length = 0 ) => ( {
5+ errorMessage :
6+ 'The length of your input must be less than ' + parseInt ( length ) ,
7+ callback : value => value . length <= parseInt ( length )
8+ } ) ;
9+
10+ let validMinLength = ( length = 0 ) => ( {
11+ errorMessage :
12+ 'The length of your input must be more than ' + parseInt ( length ) ,
13+ callback : value => value . length >= parseInt ( length )
14+ } ) ;
15+
16+ class Password extends Component {
17+ render ( ) {
18+ return (
19+ < div >
20+ < Input
21+ identifier = "passwordInput"
22+ labelContent = "Password Input"
23+ type = "password"
24+ validation = { [ validMaxLength ( 15 ) , validMinLength ( 8 ) ] }
25+ />
26+ </ div >
27+ ) ;
28+ }
29+ }
30+
31+ export default {
32+ label : "Input - Password" ,
33+ app : Password
34+ } ;
Original file line number Diff line number Diff line change 99}
1010
1111/* Hides validation messages whilst the Input has cursor focus */
12- .container -focus .validation-invalid {
12+ .validation -focus .validation-invalid {
1313 display : none;
1414}
Original file line number Diff line number Diff line change 11import React , { Component } from 'react' ;
22import ReactDOM from 'react-dom' ;
33import Input from 'react-component_input' ;
4+ import Password from './password' ;
45import TextExample from './text' ;
56import Textarea from './textarea' ;
67
78const appElement = document . getElementById ( 'example' ) ;
89
910const examples = [
11+ Password ,
1012 TextExample ,
1113 Textarea
1214] ;
You can’t perform that action at this time.
0 commit comments