Skip to content

Commit 27ecde5

Browse files
Merge pull request #6 from oslabs-beta/xiao
add left indicator
2 parents ef8d65f + 90af69f commit 27ecde5

File tree

4 files changed

+38
-16
lines changed

4 files changed

+38
-16
lines changed

app/src/components/StateManagement/CreateTab/components/StatePropsPanel.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ const StatePropsPanel = ({ isThemeLight, data}): JSX.Element => {
203203
className={isThemeLight ? `${classes.selectEmpty} ${classes.rootUnderlineLight} ${classes.inputTextLight}` : `${classes.selectEmpty} ${classes.rootUnderlineDark} ${classes.inputTextDark}`}
204204
value={inputType}
205205
onChange={(event, index) => setInputType(index.props.value)}
206+
MenuProps={{ disablePortal: true }}
206207
style={ isThemeLight
207208
? {backgroundColor: '#eef0f1', color: '#000', border: '1px solid black', height: '28px', width: '200px'}
208209
: {backgroundColor: 'gray', color: '#fff', border: '1px solid white', height: '28px', width: '200px'}}

app/src/components/main/Canvas.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ function Canvas(props): JSX.Element {
137137
}
138138
}
139139
}
140-
if (!hasDiffParent) {
140+
// if (!hasDiffParent) {
141141
dispatch({
142142
type: 'ADD CHILD',
143143
payload: {
@@ -146,8 +146,8 @@ function Canvas(props): JSX.Element {
146146
childId: null
147147
}
148148
});
149-
} else {
150-
149+
// } else {
150+
// alert('something is wrong');
151151
// able to duplicate a component in dev only does not work for prod
152152
// create a new component
153153

@@ -165,7 +165,7 @@ function Canvas(props): JSX.Element {
165165
// setNewComp(!newComp)
166166
// }
167167

168-
}
168+
// }
169169

170170
}
171171
},

app/src/containers/LeftContainer.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ const LeftContainer = (props): JSX.Element => {
2424
}, []);
2525

2626
return (
27-
<div style={{borderRight: "4px solid #3FD0A2"}}>
28-
<div className="column left hide-show" style={style}>
27+
<div className="left-container hide-show">
28+
<div className="column left" style={style}>
2929
<Grid container direction="column" alignItems="center">
3030
<h4>Drag and Drop</h4>
3131
<DragDropPanel isThemeLight={props.isThemeLight}/>
@@ -34,6 +34,11 @@ const LeftContainer = (props): JSX.Element => {
3434
</div>
3535
</Grid>
3636
</div>
37+
<div className='left-indicator'>
38+
<span className="material-symbols-outlined">
39+
eject
40+
</span>
41+
</div>
3742
</div>
3843
);
3944
};

app/src/public/styles/style.css

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
@import url('https://fonts.googleapis.com/css?family=Open+Sans&display=swap');
77
@import url('https://fonts.googleapis.com/css2?family=Raleway&display=swap');
88
@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');
9-
9+
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0');
1010

1111
html {
1212
box-sizing: border-box;
@@ -98,27 +98,43 @@ LEFT COLUMN
9898
position: relative;
9999
}
100100

101+
.left-container {
102+
display: flex;
103+
}
104+
105+
.left-indicator {
106+
height: 50%;
107+
width: 20px;
108+
background-color: silver;
109+
writing-mode: vertical-lr;
110+
text-align: center;
111+
border-radius: 0 10px 10px 0;
112+
align-self: center;
113+
}
114+
101115
.left {
102-
padding: 10px 10px 10px 0px;
116+
padding: 0px;
103117
display: flex;
104-
/* width: 225px;
105-
min-width: 225px; */
118+
height: 100%;
119+
width: 235px;
120+
min-width: 225px;
106121
flex-direction: column;
107122
align-content: center;
108123
position: relative;
109124
overflow-x: hidden;
110125
}
126+
111127
.hide-show {
112-
opacity: 0;
113-
width: 0;
114-
transition: opacity 0.5s linear, width 0.5s ease-in-out;
115128
position: absolute;
116129
height: 100%;
130+
left: -237px;
131+
/* opacity: 0; */
132+
transition: all 0.5s ease-in-out;
117133
}
134+
118135
.hide-show:hover {
119-
opacity: 1;
120-
width: 225px;
121-
min-width: 225px;
136+
/* opacity: 1; */
137+
left: 0px;
122138
z-index: 289;
123139
}
124140

0 commit comments

Comments
 (0)