Skip to content

Commit a25a997

Browse files
committed
not perfect but good enough
1 parent 0a54c4a commit a25a997

File tree

1 file changed

+7
-32
lines changed

1 file changed

+7
-32
lines changed

app/src/components/main/AddLink.tsx

Lines changed: 7 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import Select from '@material-ui/core/Select';
77
import { InputLabel } from '@material-ui/core';
88
import { TextField } from '@material-ui/core';
99
import { styleContext } from '../../containers/AppContainer';
10+
import { makeStyles } from '@mui/material/styles'
1011

1112
function AddLink({ id, onClickHandler }) {
1213
const { isThemeLight } = useContext(styleContext);
@@ -37,47 +38,21 @@ function AddLink({ id, onClickHandler }) {
3738
}
3839

3940
const pagesItems = state.components.filter(comp => state.rootComponents.includes(comp.id));
40-
<<<<<<< HEAD
41-
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>));
41+
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>));
42+
4243

4344
return (
44-
<div style={{padding: '1px', float: 'right', display: 'flex' }}>
45-
<FormControl size='medium' style={ {color: '#008000'/*{display: 'flex', alignItems: 'stretch'}*/} }>
46-
<InputLabel id='page-select-label' style={ { color:' #008000'} }>Pages</InputLabel>
45+
<div style={{float: 'right'}}>
46+
<FormControl variant='outlined' focused='true' style={ {width: '100%'} }>
47+
<InputLabel id='page-select-label' style={ {color: isThemeLight? '#000' : '#fff'} }>Pages</InputLabel>
4748
<Select
48-
// MenuProps={{
49-
// anchorOrigin: {
50-
// vertical: "bottom",
51-
// horizontal: "left"
52-
// },
53-
// transformOrigin: {
54-
// vertical: "top",
55-
// horizontal: "left"
56-
// },
57-
// getContentAnchorEl: null
58-
// }}
5949
label='Pages'
60-
labelId='page-select-label'
61-
=======
62-
const dropDown = pagesItems.map(comp => <MenuItem style={{ color: 'black' }} value={comp.name}>{comp.name}</MenuItem>);
63-
64-
return (
65-
<div style={{padding: '1px', float: 'right', display: 'flex', border: '2px solid red', alignSelf: 'center'}}>
66-
<FormControl size='medium' style={{display: 'flex'}}>
67-
{/* <InputLabel style={ { color: isThemeLight? '#fff' : '#000'} }>Pages</InputLabel> */}
68-
<Select label='pages'
69-
>>>>>>> 6d3fbd545288416cd1e582d188963853b7c08f07
70-
variant="outlined"
71-
onMouseDown={onClickHandler}
50+
// onMouseDown={onClickHandler}
7251
onChange={handlePageSelect}
7352
id="page-select"
74-
<<<<<<< HEAD
75-
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'}}
76-
=======
7753
style={ isThemeLight
7854
? {backgroundColor: '#eef0f1', color: '#000', border: '1px solid black', height: '28px', width: '200px'}
7955
: {backgroundColor: 'gray', color: '#fff', border: '1px solid white', height: '28px', width: '200px'}}
80-
>>>>>>> 6d3fbd545288416cd1e582d188963853b7c08f07
8156
>
8257
{dropDown}
8358
</Select>

0 commit comments

Comments
 (0)