Skip to content

Instantly share code, notes, and snippets.

@leihuagh
Created April 20, 2018 18:51
Show Gist options
  • Select an option

  • Save leihuagh/c04e87ffb83f7176225ec97ff13876a7 to your computer and use it in GitHub Desktop.

Select an option

Save leihuagh/c04e87ffb83f7176225ec97ff13876a7 to your computer and use it in GitHub Desktop.
exercises index.js
import React, { Component } from 'react'
import { Grid } from 'material-ui'
import LeftPane from './LeftPane'
import RightPane from './RightPane'
const styles = {
Paper: {
padding: 20,
marginTop: 10,
marginButton: 10,
height: 500,
overflowY: 'auto'
}
}
class Exercises extends Component {
constructor(props) {
super(props)
this.state = {
exercises: this.props.exercises
}
}
render() {
const { exercises } = this.state
return (
<div>
<Grid container>
<LeftPane styles={styles} exercises={exercises} />
<RightPane styles={styles} />
</Grid>
</div>
)
}
}
export default Exercises
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment