From 1030607813b733ffe5da09509dee11025f05e6d6 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Thu, 8 Nov 2018 14:48:17 -0500 Subject: [PATCH] feat(cockpit): make editor resizable --- embark-ui/package-lock.json | 5 + embark-ui/package.json | 1 + embark-ui/src/components/FileExplorer.js | 5 +- embark-ui/src/components/TextEditor.js | 10 +- embark-ui/src/constants.js | 4 + embark-ui/src/containers/EditorContainer.css | 15 +- embark-ui/src/containers/EditorContainer.js | 144 +++++++++++++++--- .../src/containers/TextEditorContainer.js | 11 +- 8 files changed, 166 insertions(+), 29 deletions(-) diff --git a/embark-ui/package-lock.json b/embark-ui/package-lock.json index 3a08ec9e2..76149d23d 100644 --- a/embark-ui/package-lock.json +++ b/embark-ui/package-lock.json @@ -10121,6 +10121,11 @@ } } }, + "re-resizable": { + "version": "4.9.3", + "resolved": "https://registry.npmjs.org/re-resizable/-/re-resizable-4.9.3.tgz", + "integrity": "sha512-JKzmZdUAYWs85YErkmZNB7hjGR9qUOHFUZUtEplZlEZBFHRguiWck5J+HFTy/NjlMJtqQsYPQq57nQAO2BuRRg==" + }, "react": { "version": "16.4.2", "resolved": "https://registry.npmjs.org/react/-/react-16.4.2.tgz", diff --git a/embark-ui/package.json b/embark-ui/package.json index eec21bdda..a03330873 100644 --- a/embark-ui/package.json +++ b/embark-ui/package.json @@ -50,6 +50,7 @@ "prop-types": "^15.6.2", "qs": "^6.5.2", "raf": "3.4.0", + "re-resizable": "^4.9.3", "react": "^16.4.2", "react-blockies": "^1.4.0", "react-bootstrap-typeahead": "^3.2.4", diff --git a/embark-ui/src/components/FileExplorer.js b/embark-ui/src/components/FileExplorer.js index d9ff87a9b..c47556793 100644 --- a/embark-ui/src/components/FileExplorer.js +++ b/embark-ui/src/components/FileExplorer.js @@ -21,7 +21,8 @@ const style = (theme) => ({ top: 0, bottom: '40px', left: 0, - right: 0 + right: 0, + minWidth: '175px' }, node: { base: { @@ -214,7 +215,7 @@ class FileExplorer extends React.Component { style={style(this.props.theme)} /> -