From 5c3f36e671cf4a45cac740399f53032d2fb33ac9 Mon Sep 17 00:00:00 2001 From: catarak Date: Thu, 9 Jun 2016 22:15:50 -0400 Subject: [PATCH] add nav to IDE view --- shared/components/Nav/Nav.jsx | 18 ++++++++++++++++++ shared/components/Preview/PreviewFrame.jsx | 2 +- shared/containers/IDEView/IDEView.jsx | 2 ++ styles/base/_base.scss | 14 ++++++++++++++ styles/base/_reset.scss | 5 +++++ styles/components/_nav.scss | 16 ++++++++++++++++ styles/main.scss | 1 + 7 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 shared/components/Nav/Nav.jsx create mode 100644 styles/components/_nav.scss diff --git a/shared/components/Nav/Nav.jsx b/shared/components/Nav/Nav.jsx new file mode 100644 index 00000000..92e5424c --- /dev/null +++ b/shared/components/Nav/Nav.jsx @@ -0,0 +1,18 @@ +import React from 'react' +import { Link } from 'react-router' + +class Nav extends React.Component { + render() { + return ( + + ); + } +} + +export default Nav; \ No newline at end of file diff --git a/shared/components/Preview/PreviewFrame.jsx b/shared/components/Preview/PreviewFrame.jsx index d29423d1..0137f400 100644 --- a/shared/components/Preview/PreviewFrame.jsx +++ b/shared/components/Preview/PreviewFrame.jsx @@ -53,7 +53,7 @@ class PreviewFrame extends React.Component { } componentWillUnmount() { - React.unmountComponentAtNode(this.getDOMNode().contentDocument.body); + ReactDOM.unmountComponentAtNode(ReactDOM.findDOMNode(this).contentDocument.body); } render() { diff --git a/shared/containers/IDEView/IDEView.jsx b/shared/containers/IDEView/IDEView.jsx index a6763484..3df366e7 100644 --- a/shared/containers/IDEView/IDEView.jsx +++ b/shared/containers/IDEView/IDEView.jsx @@ -3,6 +3,7 @@ import Editor from '../../components/Editor/Editor' import PreviewFrame from '../../components/Preview/PreviewFrame' import Toolbar from '../../components/Toolbar/Toolbar' import Preferences from '../../components/Preferences/Preferences' +import Nav from '../../components/Nav/Nav' import { bindActionCreators } from 'redux' import { connect } from 'react-redux' import * as FileActions from '../../redux/actions' @@ -11,6 +12,7 @@ class IDEView extends React.Component { render() { return (
+