Skip to content
Permalink
master
Go to file
 
 
Cannot retrieve contributors at this time
17 lines (12 sloc) 397 Bytes
import React, { Component } from 'react';
import LightCircuit from '../context/context'
class LightBulb extends Component {
render() {
return <LightCircuit.Consumer>
{
({state}) => <div className={'light-bulb' + ' ' + (state.on ? 'on' : 'off') }></div>
}
</LightCircuit.Consumer>
}
}
export default LightBulb
You can’t perform that action at this time.