File tree Expand file tree Collapse file tree 4 files changed +53
-9
lines changed Expand file tree Collapse file tree 4 files changed +53
-9
lines changed Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ import styled from 'styled-components' ;
3+ import { bindActionCreators } from 'redux' ;
4+ import { useDispatch } from 'react-redux' ;
5+ import { prop , remSize } from '../../theme' ;
6+ import IconButton from './IconButton' ;
7+ import { ExitIcon } from '../../common/icons' ;
8+ import * as IDEActions from '../../modules/IDE/actions/ide' ;
9+
10+ const background = prop ( 'MobilePanel.default.background' ) ;
11+ const textColor = prop ( 'primaryTextColor' ) ;
12+
13+ const BottomBarContent = styled . h2 `
14+ padding: ${ remSize ( 12 ) } ;
15+
16+ svg {
17+ max-height: ${ remSize ( 32 ) } ;
18+ padding: ${ remSize ( 4 ) }
19+ }
20+ ` ;
21+
22+ export default ( ) => {
23+ const { expandConsole } = bindActionCreators ( IDEActions , useDispatch ( ) ) ;
24+
25+ const actions = [ { icon : ExitIcon , aria : 'Say Something' , action : expandConsole } ] ;
26+
27+ return (
28+ < BottomBarContent >
29+ { actions . map ( ( { icon, aria, action } ) =>
30+ ( < IconButton
31+ icon = { icon }
32+ aria-label = { aria }
33+ key = { `bottom-bar-${ aria } ` }
34+ onClick = { ( ) => action ( ) }
35+ /> ) ) }
36+ </ BottomBarContent >
37+ ) ;
38+ } ;
Original file line number Diff line number Diff line change 11import React from 'react' ;
22import styled from 'styled-components' ;
3- import { prop } from '../../theme' ;
3+ import { prop , grays } from '../../theme' ;
44
55
66const 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` ;
Original file line number Diff line number Diff line change @@ -28,12 +28,13 @@ import Footer from '../../../components/mobile/Footer';
2828import IDEWrapper from '../../../components/mobile/IDEWrapper' ;
2929import Console from '../components/Console' ;
3030import { remSize } from '../../../theme' ;
31+ import ActionStrip from '../../../components/mobile/ActionStrip' ;
3132
3233const isUserOwner = ( { project, user } ) => ( project . owner && project . owner . id === user . id ) ;
3334
34- const BottomBarContent = styled . h2 `
35- padding: ${ remSize ( 12 ) } ;
36- padding-left : ${ remSize ( 32 ) } ;
35+
36+ const Expander = styled . div `
37+ height : ${ props => ( props . expanded ? remSize ( 160 ) : remSize ( 27 ) ) } ;
3738` ;
3839
3940const MobileIDEView = ( props ) => {
@@ -103,8 +104,8 @@ const MobileIDEView = (props) => {
103104 />
104105 </ IDEWrapper >
105106 < Footer >
106- < Console />
107- < BottomBarContent > Bottom Bar </ BottomBarContent >
107+ { ide . consoleIsExpanded && < Expander expanded > < Console /> </ Expander > }
108+ < ActionStrip / >
108109 </ Footer >
109110 </ Screen >
110111 ) ;
Original file line number Diff line number Diff line change @@ -96,7 +96,8 @@ export default {
9696 background : grays . light ,
9797 border : grays . middleLight ,
9898 } ,
99- }
99+ } ,
100+ Separator : grays . middleLight ,
100101 } ,
101102 [ Theme . dark ] : {
102103 colors,
@@ -136,7 +137,8 @@ export default {
136137 background : grays . dark ,
137138 border : grays . middleDark ,
138139 } ,
139- }
140+ } ,
141+ Separator : grays . middleDark ,
140142 } ,
141143 [ Theme . contrast ] : {
142144 colors,
@@ -176,6 +178,7 @@ export default {
176178 background : grays . dark ,
177179 border : grays . middleDark ,
178180 } ,
179- }
181+ } ,
182+ Separator : grays . middleDark ,
180183 } ,
181184} ;
You can’t perform that action at this time.
0 commit comments