Skip to content

Instantly share code, notes, and snippets.

@wschenk
Created November 28, 2017 21:46
Show Gist options
  • Save wschenk/a61de92080ca1b7a72eea2b7e95017d6 to your computer and use it in GitHub Desktop.
Save wschenk/a61de92080ca1b7a72eea2b7e95017d6 to your computer and use it in GitHub Desktop.
create-react-app rmwc example
import React, {Component} from 'react'
import {Button, Elevation} from 'rmwc'
class FeedItem extends Component {
state = {height: 4}
render() {
return (
<Elevation
z={this.state.height}
transition
onMouseOver={() => this.setState( {height: 10} )}
onMouseOut={() => this.setState( {height:4} ) }
>
<h1>Im a feed item</h1>
<p>Lots of fun stuff here</p>
<div className="button_list">
<Button raised>Primary Button</Button>
<Button raised theme={['secondary-bg', 'text-primary-on-secondary']}>Secondary</Button>
</div>
</Elevation>
)
}
}
class Feed extends Component {
render() {
return (
<div className="feed">
<FeedItem/>
<FeedItem/>
<FeedItem/>
</div>
)
}
}
export default Feed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment