diff --git a/packages/learn/src/templates/Challenges/classic/Show.js b/packages/learn/src/templates/Challenges/classic/Show.js index d3e5a0f6cf..36a8a94fc0 100644 --- a/packages/learn/src/templates/Challenges/classic/Show.js +++ b/packages/learn/src/templates/Challenges/classic/Show.js @@ -85,6 +85,27 @@ const propTypes = { }; class ShowClassic extends PureComponent { + constructor() { + super() + + this.resizeProps = { + onStopResize: this.onStopResize.bind(this), + onResize: this.onResize.bind(this) + } + + this.state = { + resizing: false + } + } + + onResize() { + this.setState({ resizing: true }); + } + + onStopResize() { + this.setState({ resizing: false }); + } + componentDidMount() { const { challengeMounted, @@ -136,6 +157,7 @@ class ShowClassic extends PureComponent { } render() { + // console.log(this.state) const { data: { challengeNode: { @@ -154,17 +176,18 @@ class ShowClassic extends PureComponent { .map(key => files[key]) .map((file, index) => ( - {index !== 0 && } + {index !== 0 && } {index + 1 === Object.keys(files).length && ( - + )} {index + 1 === Object.keys(files).length ? ( - + - - {editors} - - - {showPreview ? : null} + + {editors} + + + {showPreview ? : null} diff --git a/packages/learn/src/templates/Challenges/classic/classic.css b/packages/learn/src/templates/Challenges/classic/classic.css index b46f229576..4d1ee4d5de 100644 --- a/packages/learn/src/templates/Challenges/classic/classic.css +++ b/packages/learn/src/templates/Challenges/classic/classic.css @@ -11,10 +11,9 @@ height: 100%; display: flex; align-items: end; - overflow: hidden; } .monaco-menu .action-label { - color: #a2bd9b; + color: #a2bd9b; letter-spacing: 0.02em; } \ No newline at end of file diff --git a/packages/learn/src/templates/Challenges/components/Output.js b/packages/learn/src/templates/Challenges/components/Output.js index d0ed1907a0..61d6c90b28 100644 --- a/packages/learn/src/templates/Challenges/components/Output.js +++ b/packages/learn/src/templates/Challenges/components/Output.js @@ -39,8 +39,6 @@ class Output extends PureComponent { } } - resizeOutput = () => this._editor.layout(); - render() { const { output, defaultOutput, height } = this.props; return ( diff --git a/packages/learn/src/templates/Challenges/components/Preview.js b/packages/learn/src/templates/Challenges/components/Preview.js index 6fd153b424..84485d87e9 100644 --- a/packages/learn/src/templates/Challenges/components/Preview.js +++ b/packages/learn/src/templates/Challenges/components/Preview.js @@ -1,17 +1,41 @@ -import React from 'react'; +import React, { PureComponent } from 'react'; +import PropTypes from 'prop-types'; import './preview.css'; const mainId = 'fcc-main-frame'; -export function Preview() { - return ( -
-