Skip to content

Commit 1004ca6

Browse files
committed
updated a bunch of styles for collapse button. Added code to toggleActionContainer function on MainContainer
1 parent b4c2aac commit 1004ca6

File tree

4 files changed

+43
-11
lines changed

4 files changed

+43
-11
lines changed

src/app/containers/ActionContainer.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,14 +191,17 @@ function ActionContainer(props: ActionContainerProps): JSX.Element {
191191
className='toggle'
192192
>
193193
{' '}
194-
{/* JR: updating onClick to stop propgation so that it detects the click only on the arrow and not the parent*/}
194+
{/* JR: updating onClick to stop propagation so that it detects the click only on the arrow and not the parent*/}
195195
<i />
196196
</a>
197197
</aside>
198+
<div className='collapse'>Collapse</div>
198199
</div>
199200
<a type='button' id='recordBtn' onClick={toggleRecord}>
200201
<i />
201-
<div style={{ display: 'flex', alignItems: 'center' }}>Toggle Record</div>
202+
<div style={{ display: 'flex', alignItems: 'center', textAlign: 'right' }}>
203+
Toggle Record
204+
</div>
202205
{recordingActions ? <Switch defaultChecked /> : <Switch />}
203206
</a>
204207
</div>

src/app/containers/MainContainer.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ function MainContainer(): JSX.Element {
3737
const toggleElem = document.querySelector('aside'); // aside is like an added text that appears "on the side" aside some text.
3838
toggleElem.classList.toggle('no-aside'); // toggles the addition or the removal of the 'no-aside' class
3939

40+
//JR: added for collapse label
41+
const collapse = document.querySelector('.collapse');
42+
collapse.classList.toggle('hidden');
43+
4044
const recordBtn = document.getElementById('recordBtn');
4145

4246
if (recordBtn.style.display === 'none') {

src/app/styles/components/_buttons.scss

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -304,17 +304,31 @@ aside {
304304
background: #242529;
305305
color: #fff;
306306
transition: width 1s;
307+
width: 100%; //JR
307308
}
308309

309310
.no-aside {
310311
width: 45px;
311312
// margin-right: 15px;
312313
}
313314

315+
//JR added for collapse label
316+
.collapse {
317+
display: flex;
318+
align-items: center;
319+
justify-content: flex-start;
320+
background: #242529;
321+
}
322+
323+
.hidden {
324+
display: none;
325+
}
326+
314327
.toggle {
315-
display: block;
316-
position: relative;
317-
margin-top: 1rem;
328+
// display: block;
329+
// position: relative;
330+
// margin-top: 1rem;
331+
height: 100%; //JR
318332
}
319333

320334
/* toggle i handles arrow animation */
@@ -330,8 +344,8 @@ aside {
330344
}
331345

332346
.toggle i {
333-
top: 8px;
334-
left: 9px;
347+
top: 16px;
348+
left: 10px;
335349
display: block;
336350
background: $blue-brand;
337351
}
@@ -365,7 +379,14 @@ aside {
365379
}
366380

367381
#arrow {
368-
margin-bottom: 40px;
382+
// margin-bottom: 40px;
383+
// display: flex;
384+
// justify-content: flex-start;
385+
386+
//JR
387+
height: 100%;
388+
display: grid;
389+
grid-template-columns: 45px 1fr;
369390
}
370391

371392
/* ^ sidebar button open and closing functionality */

src/app/styles/layout/_actionContainer.scss

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,14 @@
1616
}
1717

1818
.actionToolContainer {
19-
display: flex;
20-
justify-content: space-between;
21-
align-items: center;
19+
// display: flex;
20+
// justify-content: space-between;
21+
// align-items: center;
22+
23+
//JR
2224
height: 40px;
25+
display: grid;
26+
grid-template-columns: 1fr 1fr;
2327
}
2428

2529
#recordBtn .fa-regular {

0 commit comments

Comments
 (0)