Created
January 27, 2018 19:35
-
-
Save sajithdilshan/4bee6255ad251cd96c53a889c840d519 to your computer and use it in GitHub Desktop.
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 from "react"; | |
export default class ColorComponent extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
color: "lightgrey" | |
} | |
} | |
render() { | |
return ( | |
<div className="color-container" style={{backgroundColor: this.state.color}}/> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment