Browse Source

Fix live editor examples on home page.

Remember that one time I wrote release notes and said:

> This is a breaking change - if you were using class, you must change
> this to className or your components will be visually broken.

Good thing I didn't listen to myself!
main
Paul O’Shannessy 12 years ago
parent
commit
9c8084f396
  1. 14
      _js/live_editor.js

14
_js/live_editor.js

@ -44,7 +44,7 @@ var CodeMirrorEditor = React.createClass({
} }
return ( return (
<div class={this.props.className}> <div className={this.props.className}>
{editor} {editor}
</div> </div>
); );
@ -76,22 +76,22 @@ var ReactPlayground = React.createClass({
content = content =
<CodeMirrorEditor <CodeMirrorEditor
onChange={this.bindState('code')} onChange={this.bindState('code')}
class="playgroundStage" className="playgroundStage"
codeText={this.state.code} codeText={this.state.code}
/>; />;
} else if (this.state.mode === this.MODES.JS) { } else if (this.state.mode === this.MODES.JS) {
content = content =
<div class="playgroundJS playgroundStage"> <div className="playgroundJS playgroundStage">
{this.getDesugaredCode()} {this.getDesugaredCode()}
</div>; </div>;
} }
return ( return (
<div class="playground"> <div className="playground">
<div class="playgroundCode"> <div className="playgroundCode">
{content} {content}
</div> </div>
<div class="playgroundPreview"> <div className="playgroundPreview">
<div ref="mount" /> <div ref="mount" />
</div> </div>
</div> </div>
@ -121,7 +121,7 @@ var ReactPlayground = React.createClass({
} }
} catch (e) { } catch (e) {
React.renderComponent( React.renderComponent(
<div content={e.toString()} class="playgroundError" />, <div content={e.toString()} className="playgroundError" />,
mountNode mountNode
); );
} }

Loading…
Cancel
Save