Last active
August 29, 2018 07:51
-
-
Save haldarmahesh/344bb5cd3df02981993dd848862ef318 to your computer and use it in GitHub Desktop.
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 ThemeContext from './context/ThemeContext'; | |
| export default class Body extends Component { | |
| render() { | |
| return ( | |
| <ThemeContext.Consumer> | |
| { | |
| (theme) => ( | |
| <div className="body" style={{color: theme.fontColor, background: theme.bodybg}}> | |
| Some text goes here | |
| </div> | |
| ) | |
| } | |
| </ThemeContext.Consumer> | |
| ) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment