mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
Merge pull request #2124 from Daniel15/htmltojsx-fixes
Small tweaks to HTML to JSX page
This commit is contained in:
@@ -79,6 +79,8 @@ var HELLO_COMPONENT = "\
|
||||
codeText={HELLO_COMPONENT}
|
||||
renderCode={true}
|
||||
transformer={this.convertToJSX}
|
||||
showCompiledJSTab={false}
|
||||
editorTabTitle="Live HTML Editor"
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user