Skip to content

Instantly share code, notes, and snippets.

@tryggvigy
Created January 9, 2018 21:15
Show Gist options
  • Save tryggvigy/95a34408b6656fb49960088639cda58e to your computer and use it in GitHub Desktop.
Save tryggvigy/95a34408b6656fb49960088639cda58e to your computer and use it in GitHub Desktop.
react bem
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