Skip to content

Commit 45f9752

Browse files
committed
left panel hide and show
1 parent 1b863bc commit 45f9752

File tree

3 files changed

+50
-17
lines changed

3 files changed

+50
-17
lines changed

app/src/containers/CustomizationPanel.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const CustomizationPanel = ({ isThemeLight }): JSX.Element => {
5656
.children.find((el) => {
5757
return el.childId === state.canvasFocus.childId;
5858
});
59-
59+
6060
useEffect( () => {
6161
currFocus?.attributes?.compLink && setCompLink(currFocus.attributes.compLink);
6262
}, [state]);
@@ -215,7 +215,7 @@ const CustomizationPanel = ({ isThemeLight }): JSX.Element => {
215215
searchNestedChildren(state.components);
216216
return isLinked;
217217
};
218-
218+
219219
const updateAttributeWithState = (attributeName, componentProviderId, statePropsId, statePropsRow, stateKey='') => {
220220
const newInput = statePropsRow.value;
221221
// get the stateProps of the componentProvider
@@ -382,7 +382,7 @@ const CustomizationPanel = ({ isThemeLight }): JSX.Element => {
382382
document.removeEventListener('keydown', keyBindedFunc);
383383
};
384384
}, []);
385-
385+
386386
if(state.canvasFocus.childId === null) {
387387
return (
388388
<div className="column right" id="rightContainer" style={style}>

app/src/containers/LeftContainer.tsx

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import ComponentDrag from '../components/right/ComponentDrag';
44
import DragDropPanel from '../components/left/DragDropPanel';
55
import StateContext from '../context/context';
66
import { styleContext } from './AppContainer';
7+
78
// Left-hand portion of the app, where component options are displayed
89
const LeftContainer = (props): JSX.Element => {
910
const { style } = useContext(styleContext);
@@ -23,16 +24,20 @@ const LeftContainer = (props): JSX.Element => {
2324
}, []);
2425

2526
return (
26-
<div className="column left" style={style}>
27-
<Grid container direction="column" alignItems="center">
28-
<h4>Drag and Drop</h4>
29-
<DragDropPanel isThemeLight={props.isThemeLight}/>
30-
<div id={'CompBottomHalf'}>
31-
<ComponentDrag isThemeLight={props.isThemeLight}/>
27+
<div style={{borderRight: "4px solid #3FD0A2"}}>
28+
<div className="column left hide-show" style={style}>
29+
<Grid container direction="column" alignItems="center">
30+
<h4>Drag and Drop</h4>
31+
<DragDropPanel isThemeLight={props.isThemeLight}/>
32+
<div id={'CompBottomHalf'}>
33+
<ComponentDrag isThemeLight={props.isThemeLight}/>
34+
</div>
35+
</Grid>
3236
</div>
33-
</Grid>
3437
</div>
3538
);
3639
};
3740

41+
{/* <div className="arrow-right"></div> */}
42+
3843
export default LeftContainer;

app/src/public/styles/style.css

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ h4 {
4747
height: 300px;
4848
width: 410px;
4949
flex-grow: 1;
50-
padding-left: 10px;
50+
padding-left: 10px;
5151
padding-right: 10px;
5252
}
5353
.HTMLItemCreate {
@@ -88,16 +88,43 @@ LEFT COLUMN
8888
/////////////////////////////////////////////////
8989
*/
9090

91+
.app-container {
92+
position: relative;
93+
}
94+
9195
.left {
9296
padding: 10px 10px 10px 0px;
9397
display: flex;
94-
width: 225px;
95-
min-width: 225px;
98+
/* width: 225px;
99+
min-width: 225px; */
96100
flex-direction: column;
97101
align-content: center;
98102
position: relative;
99103
overflow-x: hidden;
100104
}
105+
.hide-show {
106+
opacity: 0;
107+
width: 0;
108+
transition: opacity 0.5s linear, width 0.5s ease-in-out;
109+
position: absolute;
110+
height: 100%;
111+
}
112+
.hide-show:hover {
113+
opacity: 1;
114+
width: 225px;
115+
min-width: 225px;
116+
z-index: 289;
117+
}
118+
.arrow-right {
119+
width: 0;
120+
height: 0;
121+
border-top: 20px solid transparent;
122+
border-bottom: 20px solid transparent;
123+
border-left: 20px solid pink;
124+
margin-top: 50%;
125+
}
126+
127+
101128
.HTMLItems {
102129
display: flex;
103130
flex-direction: column;
@@ -357,9 +384,9 @@ RIGHT COLUMN
357384
cursor: pointer;
358385
}
359386

360-
/*
387+
/*
361388
/////////////////////////////////////////////////////
362-
BOTTOM PANEL
389+
BOTTOM PANEL
363390
/////////////////////////////////////////////////////
364391
*/
365392

@@ -409,6 +436,7 @@ BOTTOM PANEL
409436
background-color: 252526;
410437
}
411438

439+
412440
/*
413441
//////////////////////////////////////////
414442
NAVBAR
@@ -423,7 +451,7 @@ NAVBAR
423451
#customized-menu {
424452
width: 16%;
425453
}
426-
/*
454+
/*
427455
/////////////////////////////////////////////////
428456
ANNOTATIONS
429457
/////////////////////////////////////////////////
@@ -600,4 +628,4 @@ a.nav_link:hover {
600628
display: flex;
601629
flex-direction: column;
602630
align-items: center;
603-
}
631+
}

0 commit comments

Comments
 (0)