@@ -6,84 +6,80 @@ import React, { Component } from 'react';
6
6
import Button from '@material-ui/core/Button' ;
7
7
import TextField from '@material-ui/core/TextField' ;
8
8
import { withStyles } from '@material-ui/core/styles' ;
9
+ import FileInput from './FileInput' ;
9
10
10
11
const styles = theme => ( {
11
- container : {
12
- display : 'flex' ,
13
- flexWrap : 'wrap' ,
14
- } ,
15
- form : {
16
- width : 310 ,
17
- } ,
18
- textField : {
19
- marginLeft : theme . spacing . unit ,
20
- marginRight : theme . spacing . unit ,
21
- width : 130 ,
22
- } ,
23
- fileField : {
24
- marginLeft : theme . spacing . unit ,
25
- marginRight : theme . spacing . unit ,
26
- width : 300 ,
27
- } ,
28
- menu : {
29
- width : 200 ,
30
- } ,
12
+ container : {
13
+ display : 'flex' ,
14
+ flexWrap : 'wrap'
15
+ } ,
16
+ form : {
17
+ width : 310
18
+ } ,
19
+ textField : {
20
+ marginLeft : theme . spacing . unit ,
21
+ marginRight : theme . spacing . unit ,
22
+ width : 130
23
+ } ,
24
+ fileField : {
25
+ marginLeft : theme . spacing . unit ,
26
+ marginRight : theme . spacing . unit ,
27
+ width : 300
28
+ } ,
29
+ menu : {
30
+ width : 200
31
+ } ,
32
+ button : {
33
+ fontSize : 16 ,
34
+ color : '#466bd4' ,
35
+ margin : 'auto' ,
36
+ display : 'block' ,
37
+ border : 'none'
38
+ }
31
39
} ) ;
32
40
33
41
class ChannelForm extends Component {
34
- render ( ) {
35
- const { classes } = this . props ;
42
+ render ( ) {
43
+ const { classes } = this . props ;
36
44
37
- return (
38
- // TODO : Replace with liform-react
39
- < div >
40
- < form className = { classes . container } >
41
- < TextField
42
- id = "channel-name"
43
- label = "Name"
44
- className = { classes . textField }
45
- margin = "normal"
46
- />
47
- < TextField
48
- id = "org-name"
49
- label = "Org Name"
50
- className = { classes . textField }
51
- margin = "normal"
52
- />
53
- </ form >
54
- < br />
55
- < form className = { classes . form } >
56
- < TextField
57
- type = "file"
58
- id = "org-path"
59
- label = "Org Path"
60
- className = { classes . fileField }
61
- helperText = "path to org config"
62
- margin = "normal"
63
- />
64
- < TextField
65
- type = "file"
66
- id = "channel-path"
67
- label = "Channel Path"
68
- className = { classes . fileField }
69
- helperText = "path to channel config"
70
- margin = "normal"
71
- />
72
- < TextField
73
- type = "file"
74
- id = "network-path"
75
- label = "Network Path"
76
- className = { classes . fileField }
77
- helperText = "path to network config"
78
- margin = "normal"
79
- />
80
- < Button size = "small" color = "primary" >
81
- Submit
82
- </ Button >
83
- </ form >
84
- </ div >
85
- ) ;
86
- }
45
+ return (
46
+ // TODO : Replace with liform-react
47
+ < div >
48
+ < form className = { classes . container } >
49
+ < TextField
50
+ id = "channel-name"
51
+ label = "Name"
52
+ className = { classes . textField }
53
+ margin = "normal"
54
+ />
55
+ < TextField
56
+ id = "org-name"
57
+ label = "Org Name"
58
+ className = { classes . textField }
59
+ margin = "normal"
60
+ />
61
+ </ form >
62
+ < form className = { classes . form } >
63
+ < FileInput
64
+ id = "org-path"
65
+ label = "Org Path"
66
+ helperText = "path to org config"
67
+ />
68
+ < FileInput
69
+ id = "channel-path"
70
+ label = "Channel Path"
71
+ helperText = "path to channel config"
72
+ />
73
+ < FileInput
74
+ id = "network-path"
75
+ label = "Network Path"
76
+ helperText = "path to network config"
77
+ />
78
+ < Button className = { classes . button } > Submit</ Button >
79
+ </ form >
80
+ </ div >
81
+ ) ;
82
+ }
87
83
}
88
84
89
85
export default withStyles ( styles ) ( ChannelForm ) ;
0 commit comments