Skip to content

Commit d932e0c

Browse files
committed
testing drop-down options
1 parent 72b241d commit d932e0c

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

app/src/components/main/AddLink.tsx

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import FormControl from '@material-ui/core/FormControl';
55
import MenuItem from '@material-ui/core/MenuItem';
66
import Select from '@material-ui/core/Select';
77
import { InputLabel } from '@material-ui/core';
8-
8+
import { TextField } from '@material-ui/core';
99
import { styleContext } from '../../containers/AppContainer';
1010

1111
function AddLink({ id, onClickHandler }) {
@@ -37,18 +37,31 @@ function AddLink({ id, onClickHandler }) {
3737
}
3838

3939
const pagesItems = state.components.filter(comp => state.rootComponents.includes(comp.id));
40-
const dropDown = pagesItems.map(comp => <MenuItem value={comp.name}>{comp.name}</MenuItem>);
40+
const dropDown = [<MenuItem style={{ color: isThemeLight? '#000' : '#fff'}} disabled /*hidden selected*/>Pages</MenuItem>].concat(pagesItems.map(comp => <MenuItem style={{ color: isThemeLight? '#000' : '#fff'}} value={comp.name}>{comp.name}</MenuItem>));
4141

4242
return (
43-
<div style={{padding: '1px', float: 'right', display: 'flex', border: '2px solid red', alignSelf: 'center'}}>
44-
<FormControl size='medium' style={{display: 'flex'}}>
45-
<InputLabel style={ { color: isThemeLight? '#000' : '#fff'} }>Pages</InputLabel>
46-
<Select label='pages'
43+
<div style={{padding: '1px', float: 'right', display: 'flex' }}>
44+
<FormControl size='medium' style={ {color: '#008000'/*{display: 'flex', alignItems: 'stretch'}*/} }>
45+
<InputLabel id='page-select-label' style={ { color:' #008000'} }>Pages</InputLabel>
46+
<Select
47+
// MenuProps={{
48+
// anchorOrigin: {
49+
// vertical: "bottom",
50+
// horizontal: "left"
51+
// },
52+
// transformOrigin: {
53+
// vertical: "top",
54+
// horizontal: "left"
55+
// },
56+
// getContentAnchorEl: null
57+
// }}
58+
label='Pages'
59+
labelId='page-select-label'
4760
variant="outlined"
4861
onMouseDown={onClickHandler}
4962
onChange={handlePageSelect}
5063
id="page-select"
51-
style={ isThemeLight? {backgroundColor: '#eef0f1', color: '#000', border: '1px solid black', height: '28px', width: '200px'} : {backgroundColor: 'gray', color: '#fff', border: '1px solid white', height: '28px', width: '200px'}}
64+
style={ isThemeLight? {/*backgroundColor: '#eef0f1',*/ color: '#000', border: '1px solid black', height: '28px', width: '200px'} : {backgroundColor: 'gray', color: '#fff', border: '1px solid white', height: '28px', width: '200px'}}
5265
>
5366
{dropDown}
5467
</Select>

0 commit comments

Comments
 (0)