diff --git a/_js/jsx-compiler.js b/_js/jsx-compiler.js index 0e703d7f..cbc1a3cf 100644 --- a/_js/jsx-compiler.js +++ b/_js/jsx-compiler.js @@ -21,6 +21,7 @@ React.renderComponent( codeText={HELLO_COMPONENT} renderCode={true} transformer={transformer} - />, + showCompiledJSTab={false} + />, document.getElementById('jsxCompiler') ); diff --git a/_js/live_editor.js b/_js/live_editor.js index 955e2825..1af8fa22 100644 --- a/_js/live_editor.js +++ b/_js/live_editor.js @@ -85,7 +85,8 @@ var ReactPlayground = React.createClass({ return { transformer: function(code) { return JSXTransformer.transform(code).code; - } + }, + showCompiledJSTab: true }; }, @@ -116,7 +117,7 @@ var ReactPlayground = React.createClass({ compiledCode = this.compileCode(); } catch (err) {} - var jsContent = + var JSContent = ; - var jsxContent = + var JSXContent = + Compiled JS + ; + + var JSXTab = +
+ Live JSX Editor +
+ return (
-
- Live JSX Editor -
-
- Compiled JS -
+ {JSXTab} + {this.props.showCompiledJSTab && JSTab}
- {isJS ? jsContent : jsxContent} + {isJS ? JSContent : JSXContent}