From f1d113a431485013e4ebd6270b968ff742dd64bf Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Sun, 28 Oct 2018 17:11:08 +0100 Subject: [PATCH] put aside under when on a small screen --- embark-ui/src/containers/EditorContainer.css | 14 ++++++++++++++ embark-ui/src/containers/EditorContainer.js | 13 +++++-------- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/embark-ui/src/containers/EditorContainer.css b/embark-ui/src/containers/EditorContainer.css index 4793f5509..7ef31ba88 100644 --- a/embark-ui/src/containers/EditorContainer.css +++ b/embark-ui/src/containers/EditorContainer.css @@ -16,6 +16,10 @@ background-color: #20a8d8; } +.text-editor-container { + overflow: hidden; +} + .editor-aside { position: absolute; top: 0; @@ -25,3 +29,13 @@ overflow-x: hidden; overflow-y: auto; } + +@media (max-width: 768px) { + .editor-aside { + position: relative; + } + + .aside-opened .text-editor-container { + max-height: 500px; + } +} diff --git a/embark-ui/src/containers/EditorContainer.js b/embark-ui/src/containers/EditorContainer.js index 489271b63..284aba3b3 100644 --- a/embark-ui/src/containers/EditorContainer.js +++ b/embark-ui/src/containers/EditorContainer.js @@ -8,6 +8,7 @@ import FileExplorerContainer from './FileExplorerContainer'; import TextEditorToolbarContainer from './TextEditorToolbarContainer'; import {fetchEditorTabs as fetchEditorTabsAction} from '../actions'; import {getCurrentFile} from '../reducers/selectors'; +import classnames from 'classnames'; import './EditorContainer.css'; @@ -52,27 +53,23 @@ class EditorContainer extends React.Component { return this.state.currentAsideTab.length ? 7 : 10; } - textEditorXsSize() { - return this.state.currentAsideTab.length ? 2 : 8; - } - render() { return ( - + this.openAsideTab(newTab)} isContract={this.isContract()} currentFile={this.props.currentFile} activeTab={this.state.currentAsideTab}/> - + this.toggleShowHiddenFiles()} /> - + this.onFileContentChange(newContent)} /> {this.state.currentAsideTab && - +