Skip to content

Commit

Permalink
Small tweaks to HTML to JSX page:
Browse files Browse the repository at this point in the history
 - Remove "Compiled JS" tab since it doesn't make sense
 - Relabelled editor to "Live HTML Editor" rather than "Live JSX Editor"
  • Loading branch information
Daniel15 committed Sep 1, 2014
1 parent 820210f commit e11b407
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/_js/html-jsx.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ var HELLO_COMPONENT = "\
codeText={HELLO_COMPONENT}
renderCode={true}
transformer={this.convertToJSX}
showCompiledJSTab={false}
editorTabTitle="Live HTML Editor"
/>
</div>
);
Expand Down
5 changes: 4 additions & 1 deletion docs/_js/live_editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,16 @@ 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() {
return {
transformer: function(code) {
return JSXTransformer.transform(code).code;
},
editorTabTitle: 'Live JSX Editor',
showCompiledJSTab: true
};
},
Expand Down Expand Up @@ -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 (
Expand Down

0 comments on commit e11b407

Please sign in to comment.