File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ // 100% Caret
2
+ import React from 'react' ;
3
+ import FormControl from '@material-ui/core/FormControl' ;
4
+ import Select from '@material-ui/core/Select' ;
5
+ import MenuItem from '@material-ui/core/MenuItem' ;
6
+
7
+ const FormSelector = ( props ) : JSX . Element => {
8
+ const items = [ ] ;
9
+ props . items . forEach ( el => {
10
+ items . push ( < MenuItem value = { el . value } > { el . text } </ MenuItem > ) ;
11
+ } )
12
+ return (
13
+ < div className = { props . classes . configRow } >
14
+ < div className = { props . isThemeLight ? `${ props . classes . configType } ${ props . classes . lightThemeFontColor } ` : `${ props . classes . configType } ${ props . classes . darkThemeFontColor } ` } >
15
+ < h3 > { props . title } </ h3 >
16
+ </ div >
17
+ < div className = { props . classes . configValue } >
18
+ < FormControl variant = "filled" className = { props . classes . formControl } >
19
+ < Select
20
+ value = { props . selectValue }
21
+ name = { props . name }
22
+ onChange = { props . handleChange }
23
+ displayEmpty
24
+ className = { props . classes . select }
25
+ inputProps = { { className : props . isThemeLight ? `${ props . classes . selectInput } ${ props . classes . lightThemeFontColor } ` : `${ props . classes . selectInput } ${ props . classes . darkThemeFontColor } ` } }
26
+ >
27
+ { items }
28
+ </ Select >
29
+ </ FormControl >
30
+ </ div >
31
+ </ div >
32
+ ) ;
33
+ } ;
34
+
35
+ export default FormSelector ;
You can’t perform that action at this time.
0 commit comments