Created
January 9, 2018 21:15
-
-
Save tryggvigy/95a34408b6656fb49960088639cda58e to your computer and use it in GitHub Desktop.
react bem
This file contains 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'; | |
class Card extends Component { | |
render() { | |
return ( | |
<div className = "Card"> | |
<div style= {{backgroundColor : this.props.color}}className = "Card__title-container"> | |
<h6 className = "Card__title"> | |
{this.props.title} | |
</h6> | |
</div> | |
<div className = "Card__text-container"> | |
<p className ="Card__text"> | |
{this.props.text} | |
</p> | |
</div> | |
</div> | |
); | |
} | |
} | |
export default Card; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment