Merge pull request #2124 from Daniel15/htmltojsx-fixes

Small tweaks to HTML to JSX page
This commit is contained in:
Paul O’Shannessy
2014-09-02 14:03:21 -07:00
parent 120457b465
commit db1d5d263f
2 changed files with 6 additions and 1 deletions

View File

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

View File

@@ -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 (