Created
November 28, 2017 21:46
-
-
Save wschenk/a61de92080ca1b7a72eea2b7e95017d6 to your computer and use it in GitHub Desktop.
create-react-app rmwc example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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