Skip to content

Commit 00cb776

Browse files
authored
Merge pull request #21 from oslabs-beta/katrina1
adjusted drop-box UI
2 parents 6d3fbd5 + ff530a2 commit 00cb776

File tree

5 files changed

+29
-21
lines changed

5 files changed

+29
-21
lines changed

app/src/components/form/Selector.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import React from 'react';
33
import FormControl from '@material-ui/core/FormControl';
44
import Select from '@material-ui/core/Select';
55
import MenuItem from '@material-ui/core/MenuItem';
6+
import { SelectLight, SelectDark } from '../../public/styles/theme';
67

78
const FormSelector = (props): JSX.Element => {
89
const items = [];
@@ -13,13 +14,13 @@ const FormSelector = (props): JSX.Element => {
1314
})
1415
return (
1516
<div className={props.classes.configRow}>
16-
1717
<div className={props.isThemeLight ? `${props.classes.configType} ${props.classes.lightThemeFontColor}` : `${props.classes.configType} ${props.classes.darkThemeFontColor}`}>
1818
<h3>{props.title}</h3>
1919
</div>
2020
<div className={props.classes.configValue}>
2121
<FormControl variant="filled" className={props.classes.formControl}>
2222
<Select
23+
style={props.isThemeLight ? { border: '1px solid #0099e6' } : null }
2324
value={props.selectValue}
2425
name={props.name}
2526
onChange={props.handleChange}

app/src/components/main/AddLink.tsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ 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';
10+
import { makeStyles } from '@mui/material/styles'
1011

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

3940
const pagesItems = state.components.filter(comp => state.rootComponents.includes(comp.id));
40-
const dropDown = pagesItems.map(comp => <MenuItem style={{ color: 'black' }} 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+
4143

4244
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? '#fff' : '#000'} }>Pages</InputLabel> */}
46-
<Select label='pages'
47-
variant="outlined"
48-
onMouseDown={onClickHandler}
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>
48+
<Select
49+
label='Pages'
50+
// onMouseDown={onClickHandler}
4951
onChange={handlePageSelect}
5052
id="page-select"
5153
style={ isThemeLight

app/src/components/right/ComponentPanelItem.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,12 @@ const ComponentPanelItem: React.FC<{
5252
display: 'grid',
5353
color: isThemeLight ? 'black' : 'white',
5454
backgroundColor: 'transparent',
55-
border: root
56-
? '2px dotted #186BB4'
57-
: '2px solid #186BB4',
55+
// border: root
56+
// ? '2px dotted #186BB4'
57+
// : '2px solid #186BB4',
58+
border: isThemeLight
59+
? '2px solid black'
60+
: '2px solid white',
5861
borderRadius: '4px',
5962
borderColor: '#000000',
6063
margin: '5px 0px'

app/src/components/right/StatePropsPanel.tsx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -139,29 +139,32 @@ const StatePropsPanel = ({ isThemeLight }): JSX.Element => {
139139
className={isThemeLight ? `${classes.selectEmpty} ${classes.rootUnderlineLight} ${classes.inputTextLight}` : `${classes.selectEmpty} ${classes.rootUnderlineDark} ${classes.inputTextDark}`}
140140
value={inputType}
141141
onChange={(event, index) => setInputType(index.props.value)}
142+
style={ isThemeLight
143+
? {backgroundColor: '#eef0f1', color: '#000', border: '1px solid black', height: '28px', width: '200px'}
144+
: {backgroundColor: 'gray', color: '#fff', border: '1px solid white', height: '28px', width: '200px'}}
142145
>
143-
<MenuItem value="">
146+
<MenuItem value="" style={{ color: 'black' }}>
144147
<em>Types</em>
145148
</MenuItem>
146-
<MenuItem id="type-selector" value={"string"}>
149+
<MenuItem id="type-selector" value={"string"} style={{ color: 'black' }}>
147150
String
148151
</MenuItem>
149-
<MenuItem id="type-selector" value={"number"}>
152+
<MenuItem id="type-selector" value={"number"} style={{ color: 'black' }}>
150153
Number
151154
</MenuItem>
152-
<MenuItem id="type-selector" value={"boolean"}>
155+
<MenuItem id="type-selector" value={"boolean"} style={{ color: 'black' }}>
153156
Boolean
154157
</MenuItem>
155-
<MenuItem id="type-selector" value={"array"}>
158+
<MenuItem id="type-selector" value={"array"} style={{ color: 'black' }}>
156159
Array
157160
</MenuItem>
158-
<MenuItem id="type-selector" value={"object"}>
161+
<MenuItem id="type-selector" value={"object"} style={{ color: 'black' }}>
159162
Object
160163
</MenuItem>
161-
<MenuItem id="type-selector" value={"undefined"}>
164+
<MenuItem id="type-selector" value={"undefined"} style={{ color: 'black' }}>
162165
Undefined
163166
</MenuItem>
164-
<MenuItem id="type-selector" value={"any"}>
167+
<MenuItem id="type-selector" value={"any"} style={{ color: 'black' }}>
165168
Any
166169
</MenuItem>
167170
</Select>

app/src/public/styles/theme.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,3 @@ export const SigninLight = createTheme({
6060
},
6161
},
6262
});
63-

0 commit comments

Comments
 (0)