Skip to content

Instantly share code, notes, and snippets.

@prof3ssorSt3v3
Created October 13, 2018 20:39
Show Gist options
  • Save prof3ssorSt3v3/ce926641a412b40b57ca6dfbecdd46df to your computer and use it in GitHub Desktop.
Save prof3ssorSt3v3/ce926641a412b40b57ca6dfbecdd46df to your computer and use it in GitHub Desktop.
import React, {Component} from 'react';
export default class LittleSister extends Component{
styleObj = {
padding: '1rem',
fontSize: '2rem',
border: '1px solid #999',
backgroundColor: this.props.bgcolor
}
render() {
const brother = this.props.brother;
return (
<div style={this.styleObj}>
<p>Little Sister wants to play with {
(!brother.currentToy)? 'nothing' : brother.currentToy }.</p>
</div>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment