@@ -13,7 +13,8 @@ import {
1313 Select ,
1414 MenuItem ,
1515 InputLabel ,
16- } from "@material-ui/core" ;
16+ Box ,
17+ } from "@mui/material" ;
1718
1819// ToggleButton Control Element appearance dependant on State of the Button. Action that is provided gets called on click.
1920const InputField = ( {
@@ -89,6 +90,20 @@ const InputField = ({
8990 </ Button >
9091 </ div >
9192 ) ;
93+ case "paddedButton" :
94+ return (
95+ < div className = "paddedButton" >
96+ < Button
97+ onClick = { ( e ) => action ( e ) }
98+ variant = "contained"
99+ color = { options === "secondary" ? "secondary" : "primary" }
100+ className = "inputElement"
101+ disabled = { ! active }
102+ >
103+ { description }
104+ </ Button >
105+ </ div >
106+ ) ;
92107 case "codeButton" :
93108 return (
94109 < div className = "codeItem" >
@@ -121,10 +136,15 @@ const InputField = ({
121136 ) ;
122137 case "select" :
123138 return (
124- < div className = "preferenceItem" >
139+ < div className = "preferenceItem formselect " >
125140 < FormControl className = "inputElement" >
126- < InputLabel shrink > { description } </ InputLabel >
127- < Select onChange = { ( e ) => action ( e ) } value = { value } >
141+ < InputLabel id = "select-label" > { description } </ InputLabel >
142+ < Select
143+ onChange = { ( e ) => action ( e ) }
144+ value = { value }
145+ labelId = "select-label"
146+ label = { description }
147+ >
128148 { options . map ( ( option , index ) => (
129149 < MenuItem value = { option } key = { index } >
130150 { option }
@@ -134,6 +154,22 @@ const InputField = ({
134154 </ FormControl >
135155 </ div >
136156 ) ;
157+ case "barselect" :
158+ return (
159+ < div className = "menuselect" >
160+ < Box >
161+ < FormControl className = "inputElement" >
162+ < Select onChange = { ( e ) => action ( e ) } value = { value } >
163+ { options . map ( ( option , index ) => (
164+ < MenuItem value = { option } key = { index } >
165+ { option }
166+ </ MenuItem >
167+ ) ) }
168+ </ Select >
169+ </ FormControl >
170+ </ Box >
171+ </ div >
172+ ) ;
137173 default :
138174 return < div > </ div > ;
139175 }
0 commit comments