File tree Expand file tree Collapse file tree 4 files changed +33
-5
lines changed Expand file tree Collapse file tree 4 files changed +33
-5
lines changed Original file line number Diff line number Diff line change 7
7
content ="width=device-width, initial-scale=1, shrink-to-fit=no "
8
8
/>
9
9
< meta name ="theme-color " content ="#000000 " />
10
+ < link rel ="stylesheet " href ="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css " integrity ="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO " crossorigin ="anonymous ">
10
11
<!--
11
12
Notice the use of %PUBLIC_URL% in the tags above.
12
13
It will be replaced with the URL of the `public` folder during the build.
16
17
work correctly both with client-side routing and a non-root public URL.
17
18
Learn how to configure a non-root public URL by running `npm run build`.
18
19
-->
19
- < title > React App </ title >
20
+ < title > React Design Patterns </ title >
20
21
</ head >
21
22
< body >
22
23
< noscript > You need to enable JavaScript to run this app.</ noscript >
Original file line number Diff line number Diff line change
1
+ .navbar {
2
+ margin-bottom : 25px ;
3
+ }
4
+
5
+ .container {
6
+ width : 400px ;
7
+ }
Original file line number Diff line number Diff line change @@ -5,8 +5,28 @@ import { formConfig } from '../FormBuilder/formConfig.js';
5
5
export class App extends Component {
6
6
render ( ) {
7
7
return (
8
- < div className = "App" >
9
- < pre > { JSON . stringify ( formConfig ) } </ pre >
8
+ < div >
9
+ < nav className = "navbar navbar-light bg-light" >
10
+ < div className = "navbar-brand" > itenium</ div >
11
+ </ nav >
12
+
13
+ < div className = "container" >
14
+ < form >
15
+ < div className = "form-group" >
16
+ < label > Email</ label >
17
+ < input type = "email" className = "form-control" />
18
+ </ div >
19
+ < div className = "form-group" >
20
+ < label > Password</ label >
21
+ < input type = "password" className = "form-control" />
22
+ </ div >
23
+ < div className = "form-group form-check" >
24
+ < input type = "checkbox" className = "form-check-input" />
25
+ < label className = "form-check-label" > Remain logged in</ label >
26
+ </ div >
27
+ < button type = "submit" className = "btn btn-primary" > Login</ button >
28
+ </ form >
29
+ </ div >
10
30
</ div >
11
31
) ;
12
32
}
Original file line number Diff line number Diff line change 1
1
export const formConfig = [
2
- { type : 'text ' , label : 'Email' , pattern : '^.*@.*$' } ,
2
+ { type : 'email ' , label : 'Email' , pattern : '^.*@.*$' } ,
3
3
{ type : 'secret' , label : 'Password' , minLength : 8 } ,
4
- { type : 'secret ' , label : 'Repeat' , minLength : 8 } ,
4
+ { type : 'toggle ' , label : 'Remain logged in' } ,
5
5
{ type : 'submit' , label : 'Login' } ,
6
6
] ;
You can’t perform that action at this time.
0 commit comments