1
1
import FormControlLabel from "@material-ui/core/FormControlLabel"
2
- import Paper from "@material-ui/core/Paper"
3
2
import Radio from "@material-ui/core/Radio"
4
3
import RadioGroup from "@material-ui/core/RadioGroup"
5
- import { lighten , makeStyles } from "@material-ui/core/styles"
4
+ import { makeStyles } from "@material-ui/core/styles"
6
5
import TextField from "@material-ui/core/TextField"
7
6
import { FC } from "react"
8
7
import { ParameterSchema } from "../../api/typesGenerated"
@@ -17,15 +16,15 @@ export interface ParameterInputProps {
17
16
export const ParameterInput : FC < ParameterInputProps > = ( { disabled, onChange, schema } ) => {
18
17
const styles = useStyles ( )
19
18
return (
20
- < Paper className = { styles . paper } >
19
+ < div className = { styles . root } >
21
20
< div className = { styles . title } >
22
21
< h2 > var.{ schema . name } </ h2 >
23
22
{ schema . description && < span > { schema . description } </ span > }
24
23
</ div >
25
24
< div className = { styles . input } >
26
25
< ParameterField disabled = { disabled } onChange = { onChange } schema = { schema } />
27
26
</ div >
28
- </ Paper >
27
+ </ div >
29
28
)
30
29
}
31
30
@@ -67,28 +66,26 @@ const ParameterField: React.FC<ParameterInputProps> = ({ disabled, onChange, sch
67
66
}
68
67
69
68
const useStyles = makeStyles ( ( theme ) => ( {
70
- paper : {
69
+ root : {
71
70
display : "flex" ,
72
71
flexDirection : "column" ,
73
72
fontFamily : MONOSPACE_FONT_FAMILY ,
73
+ paddingTop : theme . spacing ( 2 ) ,
74
+ paddingBottom : theme . spacing ( 2 ) ,
74
75
} ,
75
76
title : {
76
- background : lighten ( theme . palette . background . default , 0.1 ) ,
77
- borderBottom : `1px solid ${ theme . palette . divider } ` ,
78
- padding : theme . spacing ( 3 ) ,
79
77
display : "flex" ,
80
78
flexDirection : "column" ,
81
79
"& h2" : {
82
80
margin : 0 ,
83
81
} ,
84
82
"& span" : {
85
- paddingTop : theme . spacing ( 2 ) ,
83
+ paddingTop : theme . spacing ( 1 ) ,
86
84
} ,
87
85
} ,
88
86
input : {
89
- padding : theme . spacing ( 3 ) ,
87
+ marginTop : theme . spacing ( 2 ) ,
90
88
display : "flex" ,
91
89
flexDirection : "column" ,
92
- maxWidth : 480 ,
93
90
} ,
94
91
} ) )
0 commit comments