Browse Source

Tweaked Codepen configuration/options slightly

main
Brian Vaughn 8 years ago
parent
commit
eb6511a9f5
  1. 23
      src/templates/codepen-example.js

23
src/templates/codepen-example.js

@ -34,13 +34,16 @@ class CodepenExample extends Component {
} }
render() { render() {
// Codepen configuration // Codepen configuration.
// https://blog.codepen.io/documentation/api/prefill/
const payload = JSON.stringify({ const payload = JSON.stringify({
editors: '0010', // Open JS editor by default editors: '0010',
html: '<div id="root"></div>', html: '<div id="root"></div>',
js: this.props.pathContext.code, js: this.props.pathContext.code,
js_external: EXTERNALS.join(';'), js_external: EXTERNALS.join(';'),
js_pre_processor: 'babel', js_pre_processor: 'babel',
layout: 'left',
title: 'reactjs.org example',
}); });
return ( return (
@ -55,11 +58,17 @@ class CodepenExample extends Component {
method="POST"> method="POST">
<input type="hidden" name="data" value={payload} /> <input type="hidden" name="data" value={payload} />
<input <p>
style={primaryStyle} Not automatically redirecting?
type="submit"
value="Not automatically redirecting? Click here." <br/><br/>
/>
<input
style={primaryStyle}
type="submit"
value="Click here"
/>
</p>
</form> </form>
</Container> </Container>
); );

Loading…
Cancel
Save