Skip to content

Commit 9bebf9f

Browse files
committed
🔀 merge from develop
2 parents 9f8b41c + 7dbcde4 commit 9bebf9f

24 files changed

+9247
-14385
lines changed

client/common/icons.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ import DropdownArrow from '../images/down-filled-triangle.svg';
1313
import Preferences from '../images/preferences.svg';
1414
import Play from '../images/triangle-arrow-right.svg';
1515
import More from '../images/more.svg';
16+
import Code from '../images/code.svg';
17+
import Terminal from '../images/terminal.svg';
18+
1619

1720
// HOC that adds the right web accessibility props
1821
// https://www.scottohara.me/blog/2019/05/22/contextual-images-svgs-and-a11y.html
@@ -76,3 +79,4 @@ export const DropdownArrowIcon = withLabel(DropdownArrow);
7679
export const PreferencesIcon = withLabel(Preferences);
7780
export const PlayIcon = withLabel(Play);
7881
export const MoreIcon = withLabel(More);
82+
export const TerminalIcon = withLabel(Terminal);

client/components/OverlayManager.jsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { createPortal } from 'react-dom';
44

55
import Dropdown from './Dropdown';
66

7-
87
import { PreferencesIcon } from '../common/icons';
98

109
const OverlayManager = ({ overlay, hideOverlay }) => {
@@ -47,13 +46,8 @@ const OverlayManager = ({ overlay, hideOverlay }) => {
4746
return jsx && createPortal(jsx, document.body);
4847
};
4948

50-
// const refPropType = PropTypes.oneOfType([
51-
// PropTypes.func,
52-
// PropTypes.shape({ current: PropTypes.instanceOf(Element) }),
53-
// ]);
5449

5550
OverlayManager.propTypes = {
56-
// ref: refPropType.isRequired,
5751
overlay: PropTypes.string,
5852
hideOverlay: PropTypes.func.isRequired,
5953
};
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import React from 'react';
2+
import styled from 'styled-components';
3+
import { bindActionCreators } from 'redux';
4+
import { useDispatch, useSelector } from 'react-redux';
5+
import { remSize } from '../../theme';
6+
import IconButton from './IconButton';
7+
import { TerminalIcon } from '../../common/icons';
8+
import * as IDEActions from '../../modules/IDE/actions/ide';
9+
10+
const BottomBarContent = styled.h2`
11+
padding: ${remSize(8)};
12+
13+
svg {
14+
max-height: ${remSize(32)};
15+
}
16+
`;
17+
18+
export default () => {
19+
const { expandConsole, collapseConsole } = bindActionCreators(IDEActions, useDispatch());
20+
const { consoleIsExpanded } = useSelector(state => state.ide);
21+
22+
const actions = [{ icon: TerminalIcon, aria: 'Say Something', action: consoleIsExpanded ? collapseConsole : expandConsole }];
23+
24+
return (
25+
<BottomBarContent>
26+
{actions.map(({ icon, aria, action }) =>
27+
(<IconButton
28+
icon={icon}
29+
aria-label={aria}
30+
key={`bottom-bar-${aria}`}
31+
onClick={() => action()}
32+
/>))}
33+
</BottomBarContent>
34+
);
35+
};

client/components/mobile/Footer.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import styled from 'styled-components';
3-
import { prop } from '../../theme';
3+
import { prop, grays } from '../../theme';
44

55

66
const background = prop('MobilePanel.default.background');
@@ -12,4 +12,6 @@ export default styled.div`
1212
bottom: 0;
1313
background: ${background};
1414
color: ${textColor};
15+
16+
& > * + * { border-top: dashed 1px ${prop('Separator')} }
1517
`;

client/components/mobile/Header.jsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ import styled from 'styled-components';
33
import PropTypes from 'prop-types';
44
import { prop, remSize } from '../../theme';
55

6-
const background = prop('MobilePanel.default.background');
6+
const background = transparent => prop(transparent ? 'backgroundColor' : 'MobilePanel.default.background');
77
const textColor = prop('primaryTextColor');
88

99

1010
const HeaderDiv = styled.div`
1111
position: fixed;
1212
width: 100%;
13-
background: ${props => (props.transparent ? 'transparent' : background)};
13+
background: ${props => background(props.transparent === true)};
1414
color: ${textColor};
1515
padding: ${remSize(12)};
1616
padding-left: ${remSize(16)};
@@ -23,7 +23,6 @@ const HeaderDiv = styled.div`
2323
justify-content: flex-start;
2424
align-items: center;
2525
26-
// TODO:
2726
svg {
2827
max-height: ${remSize(32)};
2928
padding: ${remSize(4)}

client/images/terminal.svg

Lines changed: 5 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)