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 1
1
import React from 'react' ;
2
2
import styled from 'styled-components' ;
3
- import { prop } from '../../theme' ;
3
+ import { prop , grays } from '../../theme' ;
4
4
5
5
6
6
const background = prop ( 'MobilePanel.default.background' ) ;
@@ -12,4 +12,6 @@ export default styled.div`
12
12
bottom: 0;
13
13
background: ${ background } ;
14
14
color: ${ textColor } ;
15
+
16
+ & > * + * { border-top: dashed 1px ${ prop ( 'Separator' ) } }
15
17
` ;
Original file line number Diff line number Diff line change @@ -28,12 +28,13 @@ import Footer from '../../../components/mobile/Footer';
28
28
import IDEWrapper from '../../../components/mobile/IDEWrapper' ;
29
29
import Console from '../components/Console' ;
30
30
import { remSize } from '../../../theme' ;
31
+ import ActionStrip from '../../../components/mobile/ActionStrip' ;
31
32
32
33
const isUserOwner = ( { project, user } ) => ( project . owner && project . owner . id === user . id ) ;
33
34
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 ) ) } ;
37
38
` ;
38
39
39
40
const MobileIDEView = ( props ) => {
@@ -103,8 +104,8 @@ const MobileIDEView = (props) => {
103
104
/>
104
105
</ IDEWrapper >
105
106
< Footer >
106
- < Console />
107
- < BottomBarContent > Bottom Bar </ BottomBarContent >
107
+ { ide . consoleIsExpanded && < Expander expanded > < Console /> </ Expander > }
108
+ < ActionStrip / >
108
109
</ Footer >
109
110
</ Screen >
110
111
) ;
Original file line number Diff line number Diff line change @@ -96,7 +96,8 @@ export default {
96
96
background : grays . light ,
97
97
border : grays . middleLight ,
98
98
} ,
99
- }
99
+ } ,
100
+ Separator : grays . middleLight ,
100
101
} ,
101
102
[ Theme . dark ] : {
102
103
colors,
@@ -136,7 +137,8 @@ export default {
136
137
background : grays . dark ,
137
138
border : grays . middleDark ,
138
139
} ,
139
- }
140
+ } ,
141
+ Separator : grays . middleDark ,
140
142
} ,
141
143
[ Theme . contrast ] : {
142
144
colors,
@@ -176,6 +178,7 @@ export default {
176
178
background : grays . dark ,
177
179
border : grays . middleDark ,
178
180
} ,
179
- }
181
+ } ,
182
+ Separator : grays . middleDark ,
180
183
} ,
181
184
} ;
You can’t perform that action at this time.
0 commit comments