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

Loading…
Cancel
Save