Browse Source

Small tweaks to HTML to JSX page:

- Remove "Compiled JS" tab since it doesn't make sense
 - Relabelled editor to "Live HTML Editor" rather than "Live JSX Editor"
main
Daniel Lo Nigro 11 years ago
parent
commit
5a6eac6ba2
  1. 2
      _js/html-jsx.js
  2. 5
      _js/live_editor.js

2
_js/html-jsx.js

@ -79,6 +79,8 @@ var HELLO_COMPONENT = "\
codeText={HELLO_COMPONENT}
renderCode={true}
transformer={this.convertToJSX}
showCompiledJSTab={false}
editorTabTitle="Live HTML Editor"
/>
</div>
);

5
_js/live_editor.js

@ -79,6 +79,8 @@ var ReactPlayground = React.createClass({
codeText: React.PropTypes.string.isRequired,
transformer: React.PropTypes.func,
renderCode: React.PropTypes.bool,
showCompiledJSTab: React.PropTypes.bool,
editorTabTitle: React.PropTypes.string
},
getDefaultProps: function() {
@ -86,6 +88,7 @@ var ReactPlayground = React.createClass({
transformer: function(code) {
return JSXTransformer.transform(code).code;
},
editorTabTitle: 'Live JSX Editor',
showCompiledJSTab: true
};
},
@ -150,7 +153,7 @@ var ReactPlayground = React.createClass({
<div
className={JSXTabClassName}
onClick={this.handleCodeModeSwitch.bind(this, this.MODES.JSX)}>
Live JSX Editor
{this.props.editorTabTitle}
</div>
return (

Loading…
Cancel
Save